簡體   English   中英

在水平線性布局的Recycleview末尾添加按鈕(它必須滾動水平包括按鈕

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM