0

I am design the android screen and i am facing this problem in all the screens. I am using material design with Tab layout. The problem is "the bottom portion of the screen in Tab layout is totally hidden and not visible". Below is the code,

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="match_parent" >

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content" >

                <RelativeLayout
                    android:id="@+id/rl_reside_immigrants"
                    android:layout_width="fill_parent"
                    android:layout_height="match_parent"
                    android:layout_below="@+id/ll_pi_emigrants"
                    android:layout_marginTop="20dp"
                    android:background="@drawable/ex_sum_rounded_corner"
                    android:padding="10dp" >

                    <LinearLayout
                        android:id="@+id/ll_pi_reside_immigrants"
                        android:layout_width="fill_parent"
                        android:layout_height="match_parent"
                        android:layout_below="@id/ll_pi_reside_slt_date"
                        android:layout_marginTop="10dp"
                        android:orientation="horizontal"
                        android:weightSum="3" >

                        <TextView
                            android:id="@+id/tv_residence_entry"
                            android:text="@string/reside_entry" />

                        <View
                            android:layout_width="0dp"
                            android:layout_height="match_parent"
                            android:layout_weight=".2" />

                        <EditText
                            android:id="@+id/dp_residence_entry"
                            android:onClick="selectDate" />

                        <View
                            android:layout_width="0dp"
                            android:layout_height="match_parent"
                            android:layout_weight=".2" />

                        <TextView
                            android:id="@+id/tv_residence_exit"
                            android:text="@string/reside_exit" />

                        <View
                            android:layout_width="0dp"
                            android:layout_height="match_parent"
                            android:layout_weight=".2" />

                        <EditText
                            android:id="@+id/dp_residence_exit"
                            android:onClick="selectDate" />
                    </LinearLayout>
                </RelativeLayout>

                <TextView
                    android:id="@+id/tv_pi_abt_ur_resedence1"
                    android:layout_below="@+id/rl_reside_immigrants"
                    android:layout_marginTop="20dp"
                    android:text="@string/reside_title" />
            </RelativeLayout>
    </ScrollView>

Graphical layout

enter image description here

After build the device screen is

enter image description here

In graphical layout i am able to see the correct screen but while build the same in device the red marked portion in graphical layout is hidden in all device.

Need help to solve this issue.

Thanks

user2681579
  • 1,413
  • 2
  • 23
  • 50
  • In Graphical layout, i can see a yellow Alert symbol. Could you please check out the reason of that warning and also the `RelativeLayout` with `android:id="@+id/rl_reside_immigrants"` is not required as you have two Relativelayouts. – Karthik Nov 08 '15 at 06:23

1 Answers1

0

Please use

<Scrollview> 
    <LinearLayout>
        <RelativeLayout>
        **everything else**
        </RelativeLayout>
    </LinearLayout>
</Scrollview>

Because RelativeLayout is not best friend of ScrollView

michal.luszczuk
  • 2,883
  • 1
  • 15
  • 22