画像をスライドして表示するために、上部にビューページャーがあります。残りの画像やリストに表示したいものを表示した後に、このリストの下にRelativeLayoutがあります。RecycleViewは以下のRelatvieLayoutを追加することでスクロールしません。
問題: - 私はRecycleViewの問題に直面しています。 RelativeLayoutをparentofbottomに追加し、RecycleViewプロパティをRelativeLayoutよりも上に設定するまではうまくいきました。今問題はRecycleViewがスクロールしていないことです。コードに何が間違っていますか?何.ORを変更する必要が私に他の任意の方法を提案することandroid:layout_below="@id/relativeLayout1"
に、このデザインに
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:focusableInTouchMode="true"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/relativeHeader"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:background="@color/headecolor" >
<Button
android:id="@+id/btnOpenDrawer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:background="@drawable/menu_icon" />
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:background="@drawable/alert_icon" />
<TextView
android:id="@+id/txtTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textStyle="bold"
android:text="A La Une"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/blackColor" />
</RelativeLayout>
<android.support.v4.widget.NestedScrollView
android:id="@+id/scroler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/relativeHeader"
android:fillViewport="true"
android:background="@android:color/white" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusableInTouchMode="true"
android:background="@android:color/white" >
<RelativeLayout
android:id="@+id/relativeLayout1"
android:layout_width="wrap_content"
android:descendantFocusability="blocksDescendants"
android:layout_height="wrap_content" >
<RelativeLayout
android:id="@+id/rlPager"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<egdigital.alpes1.view.WrapContentViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="220dp"
android:adjustViewBounds="true"
android:background="@drawable/news_img_transparent"
/>
<ImageView
android:id="@+id/imageView_dot"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/view_pager"
android:layout_alignParentLeft="true"
android:src="@drawable/scroll_dot1" />
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rlRecycle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/relativeLayout1"
android:layout_above="@+id/rlMiniPlayer"
>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="80dp">
</android.support.v7.widget.RecyclerView>
</RelativeLayout>
<RelativeLayout
android:id="@+id/rlMiniPlayer"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_alignParentBottom="true"
>
</RelativeLayout>
</RelativeLayout>
</android.support.v4.widget.NestedScrollView>
</RelativeLayout>
<fragment
android:id="@+id/navigation_drawer"
android:name=".NavigationDrawerFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_marginLeft="25dp"
tools:layout="@layout/fragment_navigation_drawer" />
</android.support.v4.widget.DrawerLayout>
試してください: 'アンドロイド:あなたのrecyclerViewに'スクロールバー= "縦" – Marat
をu recyclerviewのレイアウトマネージャのセットアップ持っている - :?これは、このような問題
を作成していますか –
はい私はセットアップがあります。手動で高さを測定しようとしましたが、それも機能しませんでした。 –