解决方案
创建onCreateViewHolder的时候使用三个参数的打气筒,如下
对的方式,解决。
mView = LayoutInflater.from(getApplicationContext()).inflate(R.layout.newhouse_detil_detil, parent, false);
错的方式
mView = LayoutInflater.from(getApplicationContext()).inflate(R.layout.newhouse_detil_detil, null);
问题如下两张图片,明明写的是match_parent却显示不全,
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f00"
android:orientation="vertical">
这里写图片描述
这里写图片描述