Hi EveryOne,
I have list of items those I need to display Horizontally with scroll.
I'm using Mvvm-Crosss, I created MvvmListView and added MvxItemTemplate for that MvvmListView Like below.
MvxListView:
- <MvxListView
- android:id="@+id/RelatedProductItems"
- app:MvxItemTemplate="@layout/related_product_item"
- android:layout_width="match_parent"
- android:layout_height="100dp"
- android:layout_margin="10dp"
- android:nestedScrollingEnabled="true"
- app:layout_constraintTop_toBottomOf="@id/CompleteExperienceLayout" />
related_product_item
- <?xml version="1.0" encoding="utf-8"?>
- <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <ImageView
- android:id="@+id/ProductImage"
- android:layout_width="60dp"
- android:layout_height="60dp"
- android:scaleType="fitXY"
- app:MvxBind="Bitmap StringToImage(ImageData)"
- android:layout_marginTop="5dp"
- android:layout_marginLeft="5dp"
- android:paddingBottom="5dp"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
- <TextView
- android:id="@+id/ItemName"
- android:layout_width="0dp"
- android:layout_height="wrap_content"
- android:ellipsize="end"
- android:textColor="@color/black"
- android:textStyle="bold"
- android:maxLines="2"
- android:text="Product name"
- android:layout_marginLeft="5dp"
- app:MvxBind="Text Name"
- android:textSize="18sp"
- app:layout_constraintTop_toTopOf="@id/ProductImage"
- app:layout_constraintLeft_toRightOf="@id/ProductImage"
- app:layout_constraintRight_toRightOf="parent" />
- </android.support.constraint.ConstraintLayout>
How can I achieve?
Thanks in advance.