I have a beginner knowledge in android I am trying to design a screen like below my design is not work perfectly in landscape mode.I want to overcome this problem I don't know how to rectify this. What I am trying......
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/rL"
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="@mipmap/lay10"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/frame">
<LinearLayout
android:id="@+id/linearfromdate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|center"
android:layout_marginTop="5dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="From Date"
android:textColor="@color/list_background"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_below="@+id/linearfromdate"
android:layout_marginTop="20dp"
android:layout_marginLeft="2dp">
<EditText
android:id="@+id/fromDate"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:background="@drawable/edittext_round"/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/frame2"
android:layout_marginLeft="2dp"
android:layout_toRightOf="@id/frame1">
<LinearLayout
android:id="@+id/lineartodate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_gravity="top|center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="To Date"
android:textColor="@color/list_background"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear1"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="horizontal">
<EditText
android:id="@+id/todate"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:background="@drawable/edittext_round" />
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/frame2"
android:layout_marginLeft="2dp"
android:id="@+id/frame3"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lineardigit"
android:orientation="horizontal"
android:layout_gravity="top|center"
android:layout_marginTop="5dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Digit"
android:textColor="@color/list_background"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear3"
android:layout_width="80dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="horizontal"
android:background="@drawable/edittext_round"
>
<Spinner
android:id="@+id/digitspinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="80dp"
android:layout_height="wrap_content"
android:id="@+id/frame4"
android:layout_marginRight="3dp"
android:layout_marginLeft="2dp"
android:layout_toRightOf="@+id/frame3">
<LinearLayout
android:id="@+id/lineartime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_gravity="top|center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Time"
android:textColor="@color/list_background"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/edittext_round"
android:orientation="horizontal">
<Spinner
android:id="@+id/timespinner"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:id="@+id/frame5"
android:layout_toStartOf="@+id/rL"
android:layout_below="@id/frame1"
android:layout_toLeftOf="@id/frame4"
android:layout_marginLeft="2dp"
>
<LinearLayout
android:id="@+id/linearname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_gravity="top|center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name"
android:textColor="@color/list_background"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/edittext_round"
android:orientation="horizontal">
<Spinner
android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="80dp"
android:layout_height="wrap_content"
android:id="@+id/frame6"
android:layout_marginLeft="5dp"
android:layout_marginRight="2dp"
android:layout_below="@id/frame4"
android:layout_toRightOf="@id/frame5"
>
<LinearLayout
android:id="@+id/linearnametype"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_gravity="top|center"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name Type"
android:textColor="@color/list_background"
android:textSize="10sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/linear5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:background="@drawable/edittext_round"
android:orientation="horizontal">
<Spinner
android:id="@+id/nametype"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</Spinner>
</LinearLayout>
</FrameLayout>
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="30dp"
android:id="@+id/frame7"
android:layout_marginRight="2dp"
android:layout_marginLeft="2dp"
android:layout_marginTop="15dp"
android:layout_toRightOf="@id/frame6"
android:layout_below="@id/frame4">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Go"
android:background="@drawable/edittextstyle"
/>
</FrameLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/linearweb"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/rL"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/webView">
</WebView>
</LinearLayout>
</RelativeLayout>
I want to reduce the extra space in landscape mode.It works perfectly in portrait mode.I am trying my best with beginner knowledge.