i have a textview and a Menu , the textview is currently showing at the bottom of the screen and when menu pressed ,currently the menu hide the textview ,but i want the textview automatically move upwords so that everybody can see
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:orientation="vertical"
android:background="@drawable/android_bg"
android:layout_height="fill_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:background="@drawable/navigationbar">
<TextView android:layout_width="wrap_content" android:layout_centerInParent="true"
android:id="@+id/banner_text"
android:layout_height="wrap_content" android:background="@drawable/bannertext_angies_list">></TextView>
<Button
android:layout_width="55dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:layout_height="35dp"
android:background="@drawable/sign_out_button_clicked_button"
android:id="@+id/signout"/>
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:layout_width="fill_parent"
android:orientation="vertical"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp">
<TableRow
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="10dp">
<TextView
android:visibility="gone"
android:textColor="#000000"
android:text="Thank you, your report has been"
android:textSize="16sp"
android:textStyle="bold"
android:layout_width="260dp"
android:layout_height="fill_parent"
android:id="@+id/Thanks_to_submission1"/>
</TableRow>
<TableRow
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TextView
android:visibility="gone"
android:paddingLeft="70dp"
android:textColor="#000000"
android:text="submitted successfuly!"
android:textSize="16sp"
android:textStyle="bold"
android:layout_width="260dp"
android:layout_height="fill_parent"
android:id="@+id/Thanks_to_submission2"/>
</TableRow>
<TableRow
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="50dp">
<Button
android:layout_width="260dp"
android:layout_height="fill_parent"
android:background="@drawable/submitbutton"
android:id="@+id/submitreport_providertype_button"/>
</TableRow>
<TableRow
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="10dp">
<Button
android:layout_width="260dp"
android:layout_height="fill_parent"
android:background="@drawable/searchlist_button"
android:id="@+id/search_list_button"/>
</TableRow>
<TableRow
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="10dp">
<Button
android:layout_width="260dp"
android:layout_height="fill_parent"
android:background="@drawable/bigdeal_button"
android:id="@+id/big_deal_button"/>
</TableRow>
</TableLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_marginTop="50dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="14sp"
android:textStyle="bold"
android:onClick="true"
android:textColor="#000000"
android:text="Or visit our website at" />
<TextView
android:layout_width="wrap_content"
android:layout_height="40dp"
android:id="@+id/link"
android:gravity="center_vertical"
android:autoLink="web"
android:linksClickable="true"
android:layout_gravity="center"
android:textSize="14sp"
android:textStyle="bold"
android:onClick="true"
android:textColor="#000000"
android:text="@string/link" />
</LinearLayout>
<TextView
android:visibility="invisible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="14dp"
android:text="Or visit our website at" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
That’s not really supported by Android, and it’s by design. The idea is that you can use the full screen for your UI, and the menu takes up part of the space when you need to select it. You don’t want to worry about text views and other things while the menu is up. This is better than the iPhone, where you permanently have to give up screen space for menu items. If something is really important, then move it away from the bottom of the screen.
If you’re really bent on moving stuff around, you could intercept
Activity.onPrepareOptionsMenuand move things around in your UI, although the function wasn’t really meant for that purpose. Then matching call isonOptionsMenuClosed.