This seems like a very basic question but I can't seem to figure it out. I have done quite a bit of reading on how to make android scalable to big and small screens.
I have an app that is designed for a tablet and works great on there. However, while I am working on the mobile(phone) version I want to ensure it will at least look "ok" if someone opens it on a phone.
Everyone scales great besides the buttons.... I just can't seem to get the buttons to scale.
They look great on the Tab...but on the phone, they take up the whole screen.
Thank you for the help.
Here is the code:
Main.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/main_landscape"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/main_menu_plus_landscape"
android:orientation="vertical" >
<Button
android:id="@+id/button_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="38dp"
android:layout_marginTop="200dp"
android:background="@layout/button_main_selector"
android:padding="40dp"
android:text="@string/main_start_list"
android:textColor="@color/white"
android:textSize="30dp"
android:typeface="sans"/>
<Button
android:id="@+id/button_emulator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/adview"
android:layout_alignLeft="@+id/button_list"
android:layout_alignRight="@+id/button_list"
android:layout_marginBottom="168dp"
android:background="@layout/button_main_selector"
android:padding="40dp"
android:text="@string/main_start_emulator"
android:textColor="@color/white"
android:textSize="30dp"
android:typeface="sans" />
</RelativeLayout>
layout/button_main_selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Button Focused-->
<item android:state_focused="true"
android:state_pressed="false"
android:drawable="@drawable/main_buttons_selected"
/>
<!-- Button Focused Pressed-->
<item android:state_focused="true"
android:state_pressed="true"
android:drawable="@drawable/main_buttons_selected"
/>
<!-- Button Pressed-->
<item android:state_focused="false"
android:state_pressed="true"
android:drawable="@drawable/main_buttons_selected"
/>
<!-- Button Default Image-->
<item android:drawable="@drawable/main_buttons"/>
</selector>
drawable-hdpi/main_buttons.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#71bbe3"/>
<corners
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
</shape>
I have also tried putting my button files into just "drawable" and it does not seem to help. Any suggestions? (NOTE: my buttons are just solid color, no images)
res/drawable/main_buttons.xml
res/drawable/main_buttons_selected.xml
res/drawable/button_main_selector.xml