Hi everyone,

so I'm developing this app for android, I'm using "Android Studio" to code it and it's layout, but there's the thing, I can't seem to make the layout as I want, like the buttons are too huge or they aren't in the correct position and they're always messed up in different resolutions.

What I'm asking is (since I can't build layouts) is there any easier way to do it or how to do it better with Android Studio?

Thanks in advance,
Daniel Moreira.

Recommended Answers

All 4 Replies

I have found that the drag and drop interface is hard to use,so i believe near the bottom of the screen there are two tabs that say something like graphical layout and xml layout or something like that. If you click on the xml you can edit things more accurately. But if you don't know xml there is a good tutorial series android for beginners on mybringback.com

@Cronicle8 obviously you doing something wrong, always make sure that you set appropriate sized resources in res density folders (mdpi, hdpi, xhdpi et.) Secondly Android Studio is not exactly drag&drop type of UI development like Microsoft Visual Studio or NetBeans so yo ubetter watch out to keep your code clean.

Besides if you want to share your code with issues and expected results you are more then welcome to post them....

Thank you both for answering. I discovered that my problem was not having the sizes correctly on each folder (mdpi, hdpi, xhdpi). Now the only question I have now is, in pixels what are the sizes I need.
I know some.
mdpi = 320x480
hdpi = 480x800
xhdpi = 1280x800
xxhdpi = ???

Correct me if I'm wrong and tell me if you know the last one.

Thank you again. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.