1 回答

TA貢獻1788條經驗 獲得超4個贊
正如Avijit Karmakar所建議的那樣,您不能使用LinearLayout來做到這一點,您將不得不使用FrameLayout,
因為它最適合您想要在一個視圖之上實現(xiàn)另一種視圖的需求。只需將您的根布局更改為FrameLayout
<FrameLayout
android:id="@+id/linearbox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Start RecyclerView -->
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal" />
<!-- Include Open Button -->
<include layout="@layout/open_button" />
</FrameLayout>
添加回答
舉報