-7

I have a layout that fits all of the phones but when the resolution is 480x800 the bottom of the layout is off the screen. I am using dpsizes. Should not it be density independent regardless of the pixel count. What should I do to solve this issue?

Piyush
  • 18,895
  • 5
  • 32
  • 63
orkun
  • 385
  • 1
  • 3
  • 12

1 Answers1

0

Check out Figure 2 and Figure 3 here for a visual example of what using dp does.

https://developer.android.com/guide/practices/screens_support.html#density-independence

The Views stay the same size regardless of screen density so if you load up your layout on a screen that doesn't have enough physical space to display everything, some parts will end up going off the screen. You might also want to try using a RelativeLayout so if you have Views which need to be at the bottom of the screen you can define them as such without having to specify exact numbers in dp. Your layout may be using dp but it can still end up being tailored to one specific screen.

DrRobot
  • 29
  • 6