0
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<android.support.v4.view.ViewPager android:id="@+id/groups_of_content"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="100"
android:text="There are not place for me" />
</LinearLayout>
Dans le code ci-dessus ViewPager occupe tout l'endroit. Comment le faire occuper autant d'espace que le contenu l'exige. En tant que propriété "wrap_content" de la mise en page.faire ViewPager plus petit
UPD: ViewPager est rempli:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView android:id="@+id/group_name"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/group_active"
/>
</LinearLayout>
Je veux ViewPager la taille que Musch comme TextView dans le code ci-dessus. Comment le faire?
Ok, merci. Je mets à jour ma réponse – psct