Android: Lorsque le clavier apparaît, la mise en page est invisible. Comment puis-je résoudre ce problème?
Dans ma présentation, il y a un TextView
au bas de l'écran. Le problème est que lorsque je clique à l'intérieur de la zone de texte, tapez quelque chose, le clavier couvre la zone de texte comme un résultat dont je ne suis pas en mesure de voir ce qui se passe... Est-il une solution pour cela? Voici ma mise en page...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/layout_bg">
<ImageView
android:id="@+id/headerimg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:src="@drawable/header_image" />
<LinearLayout
android:id="@+id/secondaryLayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="320dip"
android:layout_marginTop = "5dip"
android:layout_marginLeft="8dip"
android:layout_marginRight="8dip"
android:cacheColorHint="#00000000">
<!-- A ListView appears here -->
</LinearLayout>
<RelativeLayout
android:id="@+id/message"
android:orientation="horizontal"
android:layout_width="300dip"
android:layout_height="80dip"
android:layout_gravity="center">
<EditText
android:id="@+id/MessageText"
android:layout_height="wrap_content"
android:layout_width="230dip"
android:layout_marginLeft="8dip"
android:layout_marginTop = "8dip"
android:paddingBottom = "8dip"
android:paddingLeft="15px"
android:hint="Type something here...">
</EditText>
<Button
android:id="@+id/MsgButton"
android:layout_margin="0dip"
android:layout_width="48dip"
android:layout_toRightOf="@id/MessageText"
android:layout_height="48dip">
</Button>
</RelativeLayout>
</LinearLayout>
hey u ne trouvé aucune soln pour le même problème..svp aider si u?
OriginalL'auteur Legend | 2009-12-17
Vous devez vous connecter pour publier un commentaire.
Vous devriez être en mesure de contrôler que dans le fichier de manifeste, par l'ajout d'android:windowSoftInputMode="adjustPan" attribut à l'activité de l'élément. Voir windowSoftInputMode documentation et un post de blog expliquer cela plus en détail.
OriginalL'auteur Heikki Toivonen