android - RecyclerView的item不能横向充满的问题
怪我咯
怪我咯 2017-04-17 17:47:42
0
3
467

RecyclerView的item中一个LinearLayout中包裹了一个TextView,但是TextView在RecyclerView中显示的始终是Wrap_content,始终不能显示出match_parent的效果

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(3)
洪涛

If the layout file is correct, please check whether the layout file is loaded correctly in the RecyclerViewAdapter中的onCreateViewHolder method. For example:

View view = mLayoutInflater.inflate(R.layout.item, parent, false);
黄舟

When you inflate the child view, does the parent pass null?

大家讲道理

Post your xml code and have a look

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template