データを示すRecyclerView
のアプリを開発中です。しかし、RecyclerView
はNOUGATではデータを表示していませんが(デバイスはPORTRAITモードですが)、Marshmallow(LANDSCAPE AND PORTRAITの両方)で正常に動作しています。私はこの[リンク] [1]をチェックし、このコードを更新しましたが、まだ私はこの問題に直面しています。私はどこが間違っているのか分かりません。ここでRecyclerビューでAndroidのヌガーのポートレートモードのデータが表示されない
は私のXMLコードです:
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentTop="true"
android:scrollbars="vertical">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
アクティビティコード:
RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
recyclerView.setLayoutManager(mLayoutManager);
recyclerView.setNestedScrollingEnabled(false); // added as per the link
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setAdapter(mAdapter);
mAdapter.notifyDataSetChanged();
このコードは、ヌガーではなく、中にランドスケープモードでのデータを示していますPORTRAIT MODE.Worksは両方のモードでMARSHMALLOWです。 助けがあれば助かります。事前に感謝
あなたはnaughtデバイスでlogcat警告を受け取りましたか? –
いいえ、@DivyeshPatelを取得していません – Anusha
NestedScrollviewの高さをmatch_parentにしてfillviewportを削除します。 –