1. Download the #1 Android News App:   EarlyBird - News for Android
    Dismiss Notice

Solving design issues in XML ?

Last Updated:

  1. TheCompBoy

    TheCompBoy Well-Known Member

    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:

    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

  2. rminkler

    rminkler New Member

    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 Well-Known Member

    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