-
Notifications
You must be signed in to change notification settings - Fork 0
/
item_image.xml
45 lines (37 loc) · 1.56 KB
/
item_image.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?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"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="itemImage"
type="com.yoesuv.myheterogeneous.viewmodels.ItemImageViewModel" />
</data>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardUseCompatPadding="true"
app:cardCornerRadius="@dimen/card_view_radius"
app:cardElevation="@dimen/card_view_elevation">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="match_parent"
android:layout_height="150dp"
android:scaleType="centerCrop"
app:setImageUrl="@{itemImage.imageUrl}"
tools:srcCompat="@tools:sample/backgrounds/scenic"/>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="8dp"
android:text="@{itemImage.name}"
android:textSize="16sp"
android:textStyle="bold"
tools:text="@tools:sample/lorem"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</layout>