blob: 621da2ef9f908110ef653d7803faf38cea6381c3 (
plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
<?xml version="1.0" encoding="utf-8"?>
<!--
Generic card with an imageview, title, description, and button
-->
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/kau_card_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/kau_padding_normal"
android:background="?android:selectableItemBackground"
android:minHeight="?android:listPreferredItemHeight">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/kau_padding_normal"
android:paddingEnd="@dimen/kau_padding_normal"
android:paddingTop="@dimen/kau_padding_normal">
<ImageView
android:id="@+id/kau_card_image"
android:layout_width="@dimen/kau_avatar_bounds"
android:layout_height="@dimen/kau_avatar_bounds"
android:layout_marginEnd="@dimen/kau_avatar_margin"
android:layout_marginStart="@dimen/kau_avatar_margin"
android:padding="@dimen/kau_avatar_padding"
android:scaleType="fitCenter"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/kau_card_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/kau_card_image"
app:layout_constraintTop_toTopOf="parent"
app:layout_goneMarginStart="@dimen/kau_padding_normal" />
<TextView
android:id="@+id/kau_card_description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/kau_card_image"
app:layout_constraintTop_toBottomOf="@id/kau_card_title"
app:layout_goneMarginStart="@dimen/kau_padding_normal" />
<LinearLayout
android:id="@+id/kau_card_bottom_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/kau_card_image"
app:layout_constraintTop_toBottomOf="@id/kau_card_description"
app:layout_goneMarginStart="@dimen/kau_padding_normal">
<Button
android:id="@+id/kau_card_button"
style="?android:borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/kau_spacing_normal"
android:textColor="?attr/colorAccent" />
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
|