Android Same Screen Resolution
Solution 1:
There are several issues here:
You can't get the same layout to work in all the different screens. This has been repeated over and over here, and in the android dev guide. As explained in that link, you'll have to set up layout folders for each screen resolution group and create layouts for each one of them with the required sizes (at least
res/layout-small
,res/layout-normal
andres/layout-large
). Also, you will probably need to create a set of bitmaps (if you have any) for each screen density (res/drawable-hdpi
,res/drawable-mdpi
andres/drawable-ldpi
at least).If you want to fix the tab at the bottom, follow the answers to this question: How to reduce the tab bar height and display in bottom.
If you use a
RelativeLayout
instead of aLinearLayout
, then you can useandroid:layout_above="@id/tabs"
to force android to render everything above the tabs and not overlapping them.If the content is bigger than the screen, then consider including your layout inside a ScrollView.
Not relevant to this question, but very relevant for future questions in SO: please, try to avoid posting irrelevant code. The Java part has no interest in your question.
Post a Comment for "Android Same Screen Resolution"