I am facing some problems while developing a screen involving a tabWidget. I have used a scrollView. The problem is that when i scroll up, the editText overlaps the tabs. Here is my main.xml file. So when i try scrolling up, the title editText begins to overlap on the TabHeading.
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:id="@+id/tabHost"
>
<TabWidget android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@android:id/tabs"
/>
<FrameLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="50px"
android:id="@android:id/tabcontent"
>
<ScrollView android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/scrollview">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/createAlarmTab"
android:paddingTop="50px"
>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/title"
android:visibility="visible"
/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/desciption"
android:visibility="visible"
android:singleLine="false"
android:lines="4"
android:gravity="top"
android:padding="10px"
/>
<DatePicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/alarmDate"
android:visibility="visible"
android:padding="10px"
/>
<TimePicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/alarmTime"
android:visibility="visible"
android:padding="10px"
/>
</LinearLayout>
</ScrollView>
<LinearLayout android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"
android:id="@+id/viewAlarmTab"
android:paddingTop="50px"
>
<ListView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/alarmList"
android:visibility="visible"
android:padding="10px"
/>
</LinearLayout>
</FrameLayout>
</TabHost>
Managed to solve it. Enclosed the scrollview inside a linearLayout and added some padding.