Android RecyclerView wrap content of not scrolling side -


i have recyclerview horizontal linearlayoutmanager. put height of recyclerview wrap_content. items have different height.

now when scroll forward through list. @ first ok. after reaches elements short height, recyclerview reduces height not increase height on tall elements after.

i'm using recyclerview v25.4

each element:

<?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:app="http://schemas.android.com/apk/res-auto">      <data>          <variable             name="provideritem"             type="domin.provider.provideritem" />          <import type="domin.provider.provideritem.status" />          <import type="android.view.view" />     </data>      <linearlayout         android:id="@+id/root"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:gravity="center_horizontal"         android:orientation="horizontal"         android:padding="2dp">           <android.support.v7.widget.cardview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:background="@android:drawable/dialog_holo_light_frame"             app:cardcornerradius="3dp"             app:cardelevation="3dp"             app:cardpreventcorneroverlap="false"             app:cardusecompatpadding="true">              <relativelayout                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_gravity="center"                 android:gravity="center">                  <imageview                     android:id="@+id/image"                     android:layout_width="@dimen/imagesizeinimagelist"                     android:layout_height="@dimen/imagesizeinimagelist"                     android:padding="0dp"                     android:scaletype="centercrop" />                   <imagebutton                     android:id="@+id/deletebutton"                     android:layout_width="@dimen/doccardactionbuttonsize"                     android:layout_height="@dimen/doccardactionbuttonsize"                     android:layout_alignleft="@id/image"                     android:layout_aligntop="@id/image"                     android:background="#00000000"                     android:paddingleft="0dp"                     android:scaletype="fitcenter"                     app:srccompat="@drawable/ic_delete_fill_48dp" />                   <imageview                     android:id="@+id/newmarker"                     android:layout_width="@dimen/doccardactionbuttonsize"                     android:layout_height="@dimen/doccardactionbuttonsize"                     android:layout_alignright="@id/image"                     android:layout_aligntop="@id/image"                     android:layout_marginright="0dp"                     android:background="#00000000"                     android:visibility="@{provideritem.status==status.toupload?view.visible:view.gone}"                     app:srccompat="@drawable/upload" />                   <progressbar                     android:id="@+id/progressindicator"                     android:layout_width="@dimen/doccardactionbuttonsize"                     android:layout_height="@dimen/doccardactionbuttonsize"                     android:layout_alignright="@id/image"                     android:layout_aligntop="@id/image"                     android:layout_marginright="0dp"                     android:background="#00000000"                     android:visibility="@{provideritem.status==status.uploading?view.visible:view.gone}"                     app:srccompat="@drawable/upload" />                  <edittext                     android:id="@+id/filedisplayname"                     style="@style/apptheme1.textappearance.text.small"                     android:layout_width="@dimen/imagesizeinimagelist"                     android:layout_height="wrap_content"                     android:layout_alignleft="@id/image"                     android:layout_alignright="@id/image"                     android:layout_below="@id/image"                     android:background="@null"                     android:ellipsize="end"                     android:gravity="center"                     android:maxheight="@dimen/maxfilenameheight"                     android:paddingleft="2dp"                     android:paddingright="2dp"                     android:text="" />              </relativelayout>         </android.support.v7.widget.cardview>     </linearlayout> </layout> 

recyclerview:

        <android.support.v7.widget.recyclerview         android:id="@+id/imagelist"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_gravity="right"         android:layout_margin="2dp"         android:cliptopadding="false"         android:orientation="horizontal"         android:padding="10dp"         android:paddingbottom="5dp"         android:visibility="visible"         app:layoutmanager="android.support.v7.widget.linearlayoutmanager"         app:reverselayout="true" /> 


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -