RecyclerView的item中一个LinearLayout中包裹了一个TextView,但是TextView在RecyclerView中显示的始终是Wrap_content,始终不能显示出match_parent的效果
PHP中文网2017-04-17 17:49:42
If the layout file is correct, please check whether the layout file is loaded correctly in the RecyclerView
的Adapter
中的onCreateViewHolder
method. For example:
View view = mLayoutInflater.inflate(R.layout.item, parent, false);