0

I'm developing an android app and I was testing it in a note II device. The problem is that now, when I deploy it to small devices(3,7''), the layouts don't look the way they suppose to. So I've done some reading and find out that I can split the layouts in order to have different files depending on the screen size/density. My question is how should I divide the folders? Layout-low, layout, layout-medium or use de layout-sw600p notation? The other thing is when I look to other apps on github they don't seem to care about this and they look fine on all devices. Can someone give me a explanation on this? My api lvl is 16 and above.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Nuno
  • 515
  • 1
  • 5
  • 21

2 Answers2

2

One handy way to make apps look great on different size devices is to use fragments. Have a look at this document : http://developer.android.com/guide/components/fragments.html#Design

In this case you can use the DisplayMetrics class in order to get the device's size. And you can say for example that devices that are small will use a fragment and bigger ones will use another fragment. If you want to make this separation by the device's screen size(inches) you can see the accepted answer on this question: How to get screen size of device?

Also the guide mentioned by Antonio MG on his answer is very useful.

Community
  • 1
  • 1
1

All we can tell you is already said here:

Supporting Multiple Screens

Just go trough these guide and all your answers will be there.

Antonio MG
  • 20,382
  • 3
  • 43
  • 62
  • The problem is that normally, for what I see, they split it in 2, like handsets and tablets. And in my case(I don't care about tablets) the layouts looks bad on small devices. So how should I split? And which is the best notation? Because it's says that this notation, layout-large, is deprecated but they still use it later on the docs. – Nuno Jan 22 '15 at 14:40