A problem that has been nagging me for weeks now, tried everything but to no avail.
What I want to do is have the EXACT SAME layout on EVERY screen size. Let me illustrate by using a picture:
On a 2.7 inch device:
On a 10.1 inch device (badly photoshopped image for illustration purposes):
But with the current Android implementation, i get this on 10.1 inch devices:
In short, i want my application to look the same (relatively speaking) including button sizes, text scaling etc etc on all screen sizes. I did this before by overriding View class, making my own View and drawing everything inside, but with that method, adding view elements got unwieldly verry verry fast and the advantages of having an "onClick" callback functionality was also gone (since i just programatically drew bitmaps inside the overriden View class to function as buttons). Is there any way to achieve this using the android xml files?
Here is my (test) XML code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:gravity="center">
<Button
android:id="@+id/button_1"
android:layout_height="fill_parent"
android:layout_width="0dip"
android:layout_weight="1"
android:text="ABCDEF" />
<Button
android:id="@+id/button_2"
android:layout_height="fill_parent"
android:layout_width="0dip"
android:layout_weight="1"
android:text="GHI" />
<Button
android:id="@+id/button_3"
android:layout_height="fill_parent"
android:layout_width="0dip"
android:layout_weight="1"
android:text="JKLM" />
</LinearLayout>