android - Recycleview in scrollview -


i have created fragment scroll view consist of recycle view in it. recycle view not getting displayed in view please me how solve this, there other way this.

here layout.xml

<?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical" android:layout_width="match_parent"     android:layout_height="wrap_content">      <relativelayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:paddingtop="8dp"         android:paddingleft="8dp"         android:paddingright="8dp"         android:paddingbottom="8dp"          android:background="#ffffff">     <imageview         android:id="@+id/productdetailpage_productimage"         android:layout_width="400dp"         android:layout_height="400dp"          android:src="@drawable/product_image_menswear"         android:background="#ffffff"/>         <button             android:id="@+id/floatingbutton"             android:layout_margintop="390dp"             android:layout_marginleft="285dp"             android:layout_width="60dp"             android:layout_height="60dp"             android:background="@drawable/shareicon"/>         <button             android:id="@+id/productdetailpage_share"             android:layout_width="30dp"             android:layout_height="30dp"             android:layout_margintop="30dp"             android:layout_marginleft="300dp"              android:background="@drawable/ic_share_grey600_18dp"             />          <button             android:id="@+id/productdetailpage_likebutton"             android:layout_width="30dp"             android:layout_height="30dp"             android:layout_margintop="30dp"             android:layout_marginleft="50dp"              android:background="@drawable/ic_favorite_outline_red_18dp"            />         <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:layout_margintop="65dp"             android:layout_marginleft="47dp"             android:text="likes(20)"             android:textsize="10dp"/>           <view             android:id="@+id/productdetailpage_separator2"             android:layout_width="fill_parent"             android:layout_height="2px"             android:layout_below="@+id/productdetailpage_productimage"             android:layout_marginbottom="2dp"             android:layout_margintop="15dp"             android:background="#90909090"               />     <textview         android:id="@+id/productdetailpage_productname"         android:layout_width="230dp"         android:layout_height="wrap_content"         android:text="burton maroon casual"         android:textcolor="#000000"         android:textsize="20dp"         android:layout_margintop="4dp"         android:layout_marginleft="8dp"          android:layout_below="@+id/productdetailpage_separator2"         />         <textview             android:id="@+id/productdetailpage_price"             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:text="rs.3000"             android:textcolor="#fb8c00"             android:textsize="15dp"             android:layout_margintop="10dp"             android:layout_marginleft="8dp"             android:layout_below="@+id/productdetailpage_productname"             />          <view             android:id="@+id/productdetailpage_separator3"             android:layout_width="fill_parent"             android:layout_height="2px"             android:layout_below="@+id/productdetailpage_price"             android:layout_marginbottom="2dp"             android:layout_margintop="15dp"             android:background="#90909090"             />         <textview             android:id="@+id/productdetailpage_description"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_below="@+id/productdetailpage_separator3"             android:layout_margintop="14dp"             android:layout_marginleft="8dp"             android:layout_marginright="8dp"             android:layout_gravity="center_vertical"             android:text="look uber trendy , cool wearing maroon  coloured shirt house of burton. made of cotton, printed shirt men keep sweat free , comfortable day long. snazzy casual shirt perfect addition wardrobe."             />          <view             android:id="@+id/productdetailpage_separator4"             android:layout_width="fill_parent"             android:layout_height="2px"             android:layout_below="@+id/productdetailpage_description"             android:layout_marginbottom="2dp"             android:layout_margintop="15dp"             android:background="#90909090"             />           <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/availabestore_header"             android:text="available in 15 stores"             android:layout_margintop="14dp"             android:layout_marginleft="8dp"             android:layout_marginright="8dp"             android:layout_marginbottom="14dp"             android:textcolor="@color/primarycolor"             android:layout_below="@+id/productdetailpage_separator4"/>           <android.support.v7.widget.recyclerview             android:paddingtop="8dp"             android:id="@+id/available_storeslist_productpage"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:layout_below="@+id/availabestore_header"             ></android.support.v7.widget.recyclerview>     </relativelayout>     </scrollview> 

if want have scrolling views within scrollview, need use nestedscrollview:

<android.support.v4.widget.nestedscrollview    xmlns:android="http://schemas.android.com/apk/res/android"   android:orientation="vertical"   android:layout_width="match_parent"   android:layout_height="match_parent">    ... </android.support.v4.widget.nestedscrollview> 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -