recyclerview - I want to display pictures with variable width and sizes from picaso in android using staggered Grid Layout like below picture -
i have used normal stgerredgridview : recyclerview.setlayoutmanager(new staggeredgridlayoutmanager(3, 1));
and layout file
android:id="@+id/card_view" android:layout_gravity="center" android:layout_margin="10dp" android:elevation="3dp" android:layout_width="wrap_content" android:layout_height="wrap_content" card_view:cardusecompatpadding="true" card_view:cardcornerradius="8dp" android:layout_marginbottom="16dp"> <relativelayout android:layout_width="match_parent" android:layout_height="match_parent" > <imageview android:id="@+id/bookimage" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?attr/selectableitembackgroundborderless" android:clickable="true" android:scaletype="centercrop" /> </relativelayout> </android.support.v7.widget.cardview>
but not able achive design given can suggest me methods can resize image variable height , width images coming web services only. have used picaso dependency display images in recyclerview that
thanks
Comments
Post a Comment