Question

Je tournerai ma tabWidget au fond. Lorsque je veux modifier le edittext le clavier ressuscitera. Mais l'onglet widget vient au-dessus du clavier. Pour le soutien à l'écran multiple i mis l'androïde: layout_weight = « 1.0 ». Après cela, je suis arrivé à ce problème, j'ai ajouté mon code de mise en page ci-dessous. toute idée de faire la TabWidget en bas de façon stable?

Code:

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
    android:layout_width="fill_parent" android:layout_height="fill_parent">
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@android:id/tabcontent" android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:layout_weight="1.0">

    </FrameLayout>
    <TabWidget android:id="@android:id/tabs"
        android:layout_gravity="bottom" android:background="@drawable/gradient_black"
        android:listSelector="@color/transparent" android:layout_width="fill_parent"
        android:layout_height="63dip" />
</LinearLayout>

Était-ce utile?

La solution

Vous pouvez régler la windowSoftInputMode dans votre manifeste. Ce contrôle la façon dont l'écran décale lorsque le clavier virtuel est affiché. Peut-être que vous voulez AdjustPan au lieu du adjustResize par défaut? Cette page a plus d'informations sur les différents modes d'entrée.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top