Le ScrollView ne fonctionne pas

Il devrait être facile je sais!!! J'ai regardé le tutoriel, recherche pour env. 2 heures et a essayé de 15 différentes méthodes (peut-être plus) et ne peut toujours pas le faire fonctionner.

Dans mon application quand j'ai focus/sélectionnez EditText et clavier apparaît, je ne peux pas faire défiler vers le bas pour l'entrée d'un autre texte

AndroidManifest.xml > activité ensemble de android:windowSoftInputMode="adjustPan"

ici est la mise en page>main.xml

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg"
android:orientation="vertical"
android:padding="20dp" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" >
<TextView
android:id="@+id/txtProduct1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Produkt 1"
android:textColor="#FFFFFF"
android:textSize="28dp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtInfo1"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginLeft="5dp"
android:gravity="right"
android:text="cena /hmot: 0 eur"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#EEEEEE"
android:width="140dp" />
</LinearLayout>
<EditText
android:id="@+id/txtPrice1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="10dp"
android:ems="10"
android:hint="Cena"
android:inputType="numberDecimal" >
</EditText>
<EditText
android:id="@+id/txtWeight1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:ems="10"
android:hint="Hmotnosť"
android:inputType="numberDecimal" />
<ImageView
android:id="@+id/imgResult"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/question" />
<EditText
android:id="@+id/txtPrice2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="20dp"
android:ems="10"
android:hint="Cena"
android:inputType="numberDecimal" />
<EditText
android:id="@+id/txtWeight2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:ems="10"
android:hint="Hmotnosť"
android:inputType="numberDecimal" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/txtInfo2"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="5dp"
android:text="cena /hmot: 0 eur"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="#EEEEEE"
android:width="140dp" />
<TextView
android:id="@+id/txtProduct2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Produkt 2"
android:textColor="#FFFFFF"
android:textSize="28dp"
android:textStyle="bold" />
</LinearLayout>
<Button
android:id="@+id/btnOK"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="15dp"
android:height="80dp"
android:text="OK"
android:textColor="#264865"
android:textSize="24dp"
android:textStyle="bold"
android:width="160dp" />
</LinearLayout>
</ScrollView>
Votre pas réellement de poser une question .. mais le TextView avec l'id txtInfo1 & txtInfo2 ont android:layout_height="fill_parent" , je changerais que pour wrap_content pour commencer
Je suppose que vous avez que la fermeture </ScrollView> tag, droit? Veuillez également décrire exactement ce qui ne fonctionne pas? Erreur lors de la compilation? Ou n'est-il pas apparaître comme vous l'avez souhaité?
Ouais il a eu juste le formatage de mal
isnt eclipse montrant toute erreur?En réalité c'est le travail de la fionie dans mon émulateur avec </scrollview>
"toujours pas de travail" est inutile déclaration. Si vous souhaitez de l'aide, vous devez fournir complet et précis les symptômes.

OriginalL'auteur vstruhar | 2012-03-31