My listview doesn't show last item

后端 未结 9 973
一个人的身影
一个人的身影 2021-01-01 03:30


        
相关标签:
9条回答
  • 2021-01-01 04:22

    you must set android:paddingBottom="" in your list view or recyclerview.

        <android.support.v7.widget.RecyclerView
        android:id="@+id/recycler_prod_category"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_constraintRight_toRightOf="parent"
        android:paddingBottom="?attr/actionBarSize"
        app:layout_constraintTop_toTopOf="parent">
    </android.support.v7.widget.RecyclerView>
    
    0 讨论(0)
  • 2021-01-01 04:24

    Use this

     <FrameLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent">
                        <ListView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content">
    
                        </ListView>
        </FrameLayout>
    
    0 讨论(0)
  • 2021-01-01 04:28

    Add this line to your Viewpager

    android:layout_marginBottom="?attr/actionBarSize"
    

    because the size you don't have at bottom is exactly the size taken by your ToolBar,

    which is supposed to be hide (using new Android Design) when you reach to bottom.

        <android.support.v4.view.ViewPager
            android:id="@+id/container"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginBottom="?attr/actionBarSize"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />
    
    0 讨论(0)
提交回复
热议问题