1. Download our Official Android App: Forums for Android!
  2. We apologize for the disruption in email services! They are sending out now, but there is a backlog, so it may take a little time to catch up.

Apps Solving design issues in XML ?

Discussion in 'Android Development' started by TheCompBoy, Sep 16, 2011.

  1. TheCompBoy

    TheCompBoy Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    589
    Joined:
    Oct 18, 2010

    Oct 18, 2010
    589
    53
    98
    Programmer
    Sweden
    When im designing my android app im using XML and for this app im using the Relative layout but when i put the buttons on my screen with the png background i made its just looking bad.. the buttons are not put equaly like they should.. Look at this picture:
    [​IMG]

    How would i solve so the pluss buttons and percent and comma and equal button will be placed right instead of looking all that weird?

    If you are intrested to see my XML code here is an link for pastebin: [XML] XMLcooode - Pastebin.com
     

    Advertisement

  2. rminkler

    rminkler Lurker
    Rank:
    None
    Points:
    6
    Posts:
    3
    Joined:
    Sep 14, 2011

    Sep 14, 2011
    3
    1
    6
    I'm new at Android stuff, but I think I see your problem. Starting with button 5 you started using android:layout_alignLeft="@+id/divided"
    What's happening is the left side of button 5 is aligning to the left side of the divide button... plus your margin. So, instead of the left side of button 5 aligning to the left side of button 8, what happens is the edge of the 5dp margin on the left side of button 5 aligns to the left side of button 8.
    You should probably try using android:layout_toRightOf="@+id/number4" similar to what you did for button 8. Either that or make your left margin 0 on button 5.
    It's really all coding discrepancies. You should try using the same basic code as you did in line two for the rest of your buttons.
     
    TheCompBoy likes this.
  3. TheCompBoy

    TheCompBoy Android Enthusiast
    Thread Starter
    Rank:
    None
    Points:
    98
    Posts:
    589
    Joined:
    Oct 18, 2010

    Oct 18, 2010
    589
    53
    98
    Programmer
    Sweden
    Wow realy big big thanks!

    Am totaly new to designing things in XML so thats why i get so many problems but man.. Big Big Thanks!!!
     

Share This Page

Loading...