LinearLayoutManagerを使って、子ビューを RecyclerViewの幅いっぱいに表示しようとして android:layout_width=”fill_parent”とかやってもうまくいかない。
こういうときは子ビューの作成パラメータをチェック。
onCreateViewHolderにて「getLayoutInflater().inflate(R.layout.XXX, null);」とかやっていると駄目で、「getLayoutInflater().inflate(R.layout.XXX, parent, false);」ってな感じに。
これは定石的な事なのかな。
闇雲に @SuppressLint(“InflateParams”)をつけて回るとはまる例。