• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Solving design issues in XML ?

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:
DNzNq.png


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
 
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.
 
  • Like
Reactions: TheCompBoy
Upvote 0
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.

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!!!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones