我想在FrameLayout之后放置4个LinearLayouts。所以在第一个屏幕上我看到FrameLayout然后当我向下滚动时,我看到其余的LinearLayouts。 我试图将它放在一个大的LinearLayout中,但它只显示FrameLayout或LinearLayout。
任何人都可以帮助我吗?
<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 :(得分:0)
您必须将LinearLayout
放在scrollView
。{/ p>
<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>