RecyclerView 不能完整显示

RecyclerView 不能完整显示

http://img1.sycdn.imooc.com/climg//594a4edf0001970303460290.jpg


页面滑到底部 RecyclerView 只有很小一个布局 然后是可滑动的状态

想实现是列表完整显示

RecyclerView 在 ScrollView>LinearLyaout里面

然后它是这样定义的

<android.support.v7.widget.RecyclerView
    android:id="@+id/news"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

</android.support.v7.widget.RecyclerView>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

2回答
木子雨 2017-12-18 14:54:57

不能完整显示时因为被下面的三个菜单挡住了,设置marginBottom就可以。

irista23 2017-06-21 18:56:42

把高度改成wrap_content

  • 提问者 慕运维2858188 #1
    试了 不行
    2017-06-21 19:10:27
  • irista23 回复 提问者 慕运维2858188 #2
    在 recyclerview 外面再包一层 RelativeLayout并且设定属性为android:layout_width="match_parent" android:layout_height="wrap_content"试试~
    2017-06-22 11:16:01
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师