Aide sur positionnement layout
Bonjour,
J'ai un layout a faire qui possède 3 élements :
- un ViewPager
- un bouton
- un texte
J'aimerais que le ViewPager soit en haut suivi du bouton et texte en bas.
J'ai regroupé le bouton et texte en bas mais je n'arrive pas a faire que le bloc du bouton et texte reste en dessous de ViewPager
Exemple :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/scrollVP"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/vpPager"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v4.view.PagerTabStrip
android:id="@+id/pager_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingBottom="4dp"
android:paddingTop="4dp" />
</android.support.v4.view.ViewPager>
</RelativeLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:layout_gravity="bottom"
android:layout_below="@+id/scrollVP">
<Button
android:id="@+id/btnValidControls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="VALIDER"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="textEnd"
android:gravity="end"
android:text="@string/switch_left"/>
</LinearLayout>
</RelativeLayout> |
Une petite aide ?
Merci