aboutsummaryrefslogtreecommitdiff
path: root/fastadapter/src/main/res
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-06-17 23:35:08 -0700
committerAllan Wang <me@allanwang.ca>2019-06-17 23:35:08 -0700
commit80b303819d18c3c34c4071f352134b3048768805 (patch)
tree928de20fe68b37b1b80d8b926327d4afbf6f04d2 /fastadapter/src/main/res
parent8725ae5647e15a38281ca6778b33413490dff91b (diff)
downloadkau-80b303819d18c3c34c4071f352134b3048768805.tar.gz
kau-80b303819d18c3c34c4071f352134b3048768805.tar.bz2
kau-80b303819d18c3c34c4071f352134b3048768805.zip
Separate adapter from fastadapter
Diffstat (limited to 'fastadapter/src/main/res')
-rw-r--r--fastadapter/src/main/res/layout/kau_iitem_card.xml74
-rw-r--r--fastadapter/src/main/res/layout/kau_iitem_header.xml16
2 files changed, 90 insertions, 0 deletions
diff --git a/fastadapter/src/main/res/layout/kau_iitem_card.xml b/fastadapter/src/main/res/layout/kau_iitem_card.xml
new file mode 100644
index 0000000..6bae0fe
--- /dev/null
+++ b/fastadapter/src/main/res/layout/kau_iitem_card.xml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Generic card with an imageview, title, description, and button
+ -->
+<androidx.cardview.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:background="?android:selectableItemBackground"
+ android:minHeight="?android:listPreferredItemHeight">
+
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="@dimen/kau_padding_normal">
+
+ <ImageView
+ android:id="@+id/kau_card_image"
+ android:layout_width="56dp"
+ android:layout_height="56dp"
+ android:layout_marginBottom="4dp"
+ android:layout_marginTop="4dp"
+ android:paddingEnd="32dp"
+ android:scaleType="fitCenter"
+ android:visibility="gone"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0" />
+
+ <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" />
+
+ <TextView
+ android:id="@+id/kau_card_description"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1"
+ android:visibility="gone"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toEndOf="@id/kau_card_image"
+ app:layout_constraintTop_toBottomOf="@id/kau_card_title" />
+
+ <LinearLayout
+ android:id="@+id/kau_card_bottom_row"
+ android:layout_width="0dp"
+ 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">
+
+ <Button
+ android:id="@+id/kau_card_button"
+ style="?android:borderlessButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?attr/colorAccent" />
+
+ </LinearLayout>
+
+ </androidx.constraintlayout.widget.ConstraintLayout>
+
+</androidx.cardview.widget.CardView>
diff --git a/fastadapter/src/main/res/layout/kau_iitem_header.xml b/fastadapter/src/main/res/layout/kau_iitem_header.xml
new file mode 100644
index 0000000..b0b2ec8
--- /dev/null
+++ b/fastadapter/src/main/res/layout/kau_iitem_header.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/kau_header_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/kau_header_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/kau_spacing_xlarge"
+ android:padding="@dimen/kau_padding_normal"
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
+
+</androidx.cardview.widget.CardView> \ No newline at end of file