Je veux définir listview pour afficher tous les éléments sans défilement.
ci-dessous est ma mise en page:ListView sans défiler sur Android
<LinearLayout
android:id="@+id/layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/tv1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Large Text"
android:textColor="@android:color/black"
android:textAppearance="?android:attr/textAppearanceLarge" />
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
<TextView
android:id="@+id/tv2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Large Text"
android:textColor="@android:color/black"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
Le LinearLayout est appartiennent à un scrollview.
Donc, je veux définir la liste de tous les éléments et faire défiler par le défilement du parent.
Comment puis-je le faire?
listview dans une vue défilante? – Raghunandan
C'est mission impossible. Utilisez d'autres alternatives pour afficher des données fixes. –
@PankajKumar ce n'est pas une mission impossible, mais surtout c'est une mauvaise pratique, regardez ma réponse ci-dessous – dumazy