Question

I'm new on android and I would like to build a mobile application for all screens sizes, I currently face a problem with the tablet size. when i apply it for the 10.1 inch screen the design is very small and I try to solve it and no thing happened :'( .

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/registrtion_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bkg"
    tools:context=".registrationActivity" >

    <RelativeLayout
        android:id="@+id/registration_layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true">

        <RelativeLayout
            android:id="@+id/registration_box"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@drawable/register_bkg"
            android:padding="15dp" >

            <EditText
                android:id="@+id/regMaymoIdEdtTxt"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentTop="true"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="65dp"
                android:background="@drawable/change_pass_text_box"
                android:hint="@string/maymoId"
                android:inputType="number"
                android:padding="15dp" >

                <requestFocus />
            </EditText>

            <EditText
                android:id="@+id/regPhoneEdtTxt"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@+id/regMaymoIdEdtTxt"
                android:layout_centerHorizontal="true"
                android:layout_marginTop="15dp"
                android:background="@drawable/change_pass_text_box"
                android:hint="@string/phone_number"
                android:inputType="phone"
                android:padding="15dp" />

            <Button
                android:id="@+id/regSubmitBtn"
                android:layout_width="100dp"
                android:layout_height="35dp"
                android:layout_below="@+id/regPhoneEdtTxt"
                android:layout_centerHorizontal="true"
                android:layout_marginBottom="15dp"
                android:layout_marginTop="15dp"
                android:background="@drawable/change_pass_submit_button" />
        </RelativeLayout>
    </RelativeLayout>

</RelativeLayout>
Was it helpful?

Solution

You can use the following resource folders to create layouts for devices with larger screens :

7 inch tablets res\layout-sw600dp

10 inch tablets res\layout-sw720dp

OTHER TIPS

For A full reference..Check this

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top