![](/img/trans.png)
[英]Creating Linear layout with Horizontal scroll view at the bottom of the screen
[英]Add button at the end of Recycleview in Horizontal linear layout (It must scroll horizontal including button
當我在水平滾動中的循環視圖后將按鈕放在線性布局中時,它只顯示2個循環視圖項。否則,當我把它放在沒有水平滾動視圖的情況下然后添加按鈕沒有;顯示adter recycleview。
<HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="260dp"
android:scrollbars="none"
android:weightSum="100">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_upcomingPickup"
android:layout_width="match_parent"
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>
<ImageView
android:id="@+id/iv_addPickup"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/_5ssp"
android:layout_marginTop="@dimen/_10ssp"
android:layout_marginRight="@dimen/_5ssp"
android:layout_marginBottom="@dimen/_20ssp"
android:src="@drawable/addpickup" />
</LinearLayout>
</HorizontalScrollView>
您必須使用NestedScrollView
而不是HorizontalScrollView
來滾動按鈕。 set recycleview.setNestedScrollingEnabled(false);
滾動順暢。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.