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 dp
sizes. Should not it be density independent regardless of the pixel count. What should I do to solve this issue?
Asked
Active
Viewed 2,269 times
-7
-
8Without xml file and without screenshot how can we help you ? – Piyush Feb 16 '17 at 12:51
-
2Post atleast xml file for solve problem – Divyesh Patel Feb 16 '17 at 12:56
-
You amateurs... – orkun Feb 16 '17 at 18:52
1 Answers
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 View
s 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 View
s 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