0

Je souhaite placer 4 LinearLayouts après FrameLayout. Donc, sur le premier écran, je vois FrameLayout puis quand je fais défiler vers le bas, je vois le reste de LinearLayouts. J'ai essayé de le placer dans un grand LinearLayout mais il montre uniquement FrameLayout ou LinearLayout.Android LinearLayout après FrameLayout

Quelqu'un peut-il m'aider?

<RelativeLayout 
    android:id="@+id/details_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:layout_alignParentLeft="true" 
    android:layout_alignParentTop="true" 
    android:visibility="visible"> 

    <ProgressBar 
     android:id="@+id/progress_bar" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_centerInParent="true" 
     android:visibility="gone" /> 


     <FrameLayout 
      android:id="@+id/details_container" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:layout_above="@+id/sample_textview" 
      android:layout_alignParentLeft="true" 
      android:layout_alignParentTop="true" /> 

    <xxx.textviews.RegularTextView 
     android:id="@+id/sample_textview" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:background="@drawable/clean_button_selector" 
     android:gravity="center" 
     android:paddingBottom="@dimen/normal_margin" 
     android:paddingTop="@dimen/normal_margin" 
     android:textColor="@color/white" 
     android:textSize="@dimen/big_text_size" /> 
</RelativeLayout> 
+0

Vous utilisez match_parent comme hauteur pour votre FrameLayout. Votre FrameLayout remplira toute la hauteur disponible dans votre vue parent. – SubinM

Répondre

0

Vous devez mettre qu'un grand LinearLayout dans un scrollView.

<ScrollView 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:scrollbars="vertical"> 

    <LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:orientation="vertical"> 

     <!-- Put here as many layout you want to add --> 

    </LinearLayout> 

</ScrollView>