I have created a layout for normal screen size with hdpi density using a relative layout. But I know some devices with same screen size which bottom is cropped for like 7-8 millimeters for 3 android common buttons (home, etc).
Now I wonder how to create layout to fit that type of devices because now it crops my layout for 7 millimeters?
Thanks.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/prime"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#8B008B"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="5dp"
tools:context="com.example.testznanja.MainActivity" >
<RelativeLayout
android:id="@+id/rl"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="@drawable/question_layout" >
<TextView
android:id="@+id/questionText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>
<Button
android:id="@+id/beginTest"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_below="@+id/infoPanel"
android:layout_marginTop="25dp"
android:background="@drawable/button_normal"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/beginTest"
android:layout_marginTop="18dp"
android:background="@drawable/button_normal"
android:text="Button" />
<Button
android:id="@+id/button3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/button2"
android:layout_marginTop="18dp"
android:background="@drawable/button_normal"
android:text="Button" />
<Button
android:id="@+id/button4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/button3"
android:layout_marginTop="18dp"
android:background="@drawable/button_normal"
android:text="Button" />
<RelativeLayout
android:id="@+id/infoPanel"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_below="@+id/rl"
android:layout_marginTop="25dp"
android:background="@drawable/info_panel_layout"
android:paddingLeft="5dp"
android:paddingRight="5dp" >
<TextView
android:id="@+id/questionsAnswers"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:text="Skor: 0"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:gravity="right"
android:text="Vreme: 20"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/help"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="50:50"
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>