I have an up with 3 buttons bat the bottom. When i test it on the emulator, the full screen appears. when i test it on my device, the buttons below does not show. it’s like the resolution is incorrect. here is my xml layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@raw/mexicanbg"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/buttonbacksubreclist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:background="@drawable/back_button"
android:onClick="back" />
<TextView
android:id="@+id/textViewreclist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="45dp"
android:text="@string/reclist"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</LinearLayout>
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="382dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="362dp" >
<Button
android:id="@+id/buttonRecipes"
android:layout_width="108dp"
android:layout_height="wrap_content"
android:background="@drawable/menu_xrecipes"
android:onClick="recipe"
android:text="@string/rec" />
<Button
android:id="@+id/buttonGroList"
android:layout_width="110dp"
android:layout_height="wrap_content"
android:background="@drawable/menu_xgrocery"
android:onClick="grocerylist"
android:text="@string/grolist" />
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/menu_xmore"
android:text="@string/more" />
</LinearLayout>
</LinearLayout>
EDIT:
New Layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@raw/mexicanbg"
android:orientation="vertical" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/buttonbacksubreclist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:background="@drawable/back_button"
android:onClick="back" />
<TextView
android:id="@+id/textViewreclist"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="45dp"
android:text="@string/reclist"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#000000" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</LinearLayout>
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="382dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="362dp" >
<Button
android:id="@+id/buttonRecipes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/menu_xrecipes"
android:onClick="recipe"
android:text="@string/rec" />
<Button
android:id="@+id/buttonGroList"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/menu_xgrocery"
android:onClick="grocerylist"
android:text="@string/grolist" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/menu_xmore"
android:text="@string/more" />
</LinearLayout>
</LinearLayout>
I found the answer … The problem is not with t he buttons.. it is with my ListView. I did not put weight on my listview. Here is my final xml layout: