RecyclerView的item中一个LinearLayout中包裹了一个TextView,但是TextView在RecyclerView中显示的始终是Wrap_content,始终不能显示出match_parent的效果
RecyclerView的item中一个LinearLayout中包裹了一个TextView,但是TextView在RecyclerView中显示的始终是Wrap_content,始终不能显示出match_parent的效果
2 回答1.3k 阅读✓ 已解决
2 回答2.6k 阅读
1 回答2.1k 阅读
1 回答1.2k 阅读
2 回答1.7k 阅读
1 回答1.3k 阅读
1.3k 阅读
如果布局文件没错的话,请检查在
RecyclerView
的Adapter
中的onCreateViewHolder
方法中是否正确加载布局文件例如: