aboutsummaryrefslogtreecommitdiff
path: root/library/src/main/res/layout
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-29 00:29:46 -0700
committerAllan Wang <me@allanwang.ca>2017-06-29 00:29:46 -0700
commit8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c (patch)
treef6e3d074c1f5d21faac6375f356607408e1e465c /library/src/main/res/layout
parentb45156a92f9b2f3fcce62fd58d25474196048f1a (diff)
downloadkau-8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c.tar.gz
kau-8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c.tar.bz2
kau-8f2e56eb5ecfc6b5ce2f1530ead6fe73f5bfe89c.zip
Completely rewrite about activity
Diffstat (limited to 'library/src/main/res/layout')
-rw-r--r--library/src/main/res/layout/kau_about_iitem_library.xml (renamed from library/src/main/res/layout/kau_about_item_library.xml)0
-rw-r--r--library/src/main/res/layout/kau_about_section_main.xml2
-rw-r--r--library/src/main/res/layout/kau_iitem_card.xml76
-rw-r--r--library/src/main/res/layout/kau_iitem_cutout.xml9
-rw-r--r--library/src/main/res/layout/kau_recycler_detached_background.xml27
-rw-r--r--library/src/main/res/layout/kau_search_iitem.xml (renamed from library/src/main/res/layout/kau_search_item.xml)0
6 files changed, 113 insertions, 1 deletions
diff --git a/library/src/main/res/layout/kau_about_item_library.xml b/library/src/main/res/layout/kau_about_iitem_library.xml
index 0129512..0129512 100644
--- a/library/src/main/res/layout/kau_about_item_library.xml
+++ b/library/src/main/res/layout/kau_about_iitem_library.xml
diff --git a/library/src/main/res/layout/kau_about_section_main.xml b/library/src/main/res/layout/kau_about_section_main.xml
index aa338ee..40d8dfb 100644
--- a/library/src/main/res/layout/kau_about_section_main.xml
+++ b/library/src/main/res/layout/kau_about_section_main.xml
@@ -11,7 +11,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
- <ca.allanwang.kau.views.CutoutTextView
+ <ca.allanwang.kau.views.CutoutView
android:id="@+id/about_main_cutout"
android:layout_width="0dp"
android:layout_height="@dimen/kau_about_header_height"
diff --git a/library/src/main/res/layout/kau_iitem_card.xml b/library/src/main/res/layout/kau_iitem_card.xml
new file mode 100644
index 0000000..4967a2e
--- /dev/null
+++ b/library/src/main/res/layout/kau_iitem_card.xml
@@ -0,0 +1,76 @@
+<?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:foreground="?android:selectableItemBackground"
+ android:minHeight="?android:listPreferredItemHeight"
+ android:paddingBottom="@dimen/kau_padding_normal"
+ android:paddingEnd="@dimen/kau_padding_normal"
+ android:paddingTop="@dimen/kau_padding_normal">
+
+ <android.support.constraint.ConstraintLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <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:visibility="gone"
+ android:scaleType="fitCenter"
+ 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" />
+
+ <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" />
+
+ <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">
+
+ <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>
diff --git a/library/src/main/res/layout/kau_iitem_cutout.xml b/library/src/main/res/layout/kau_iitem_cutout.xml
new file mode 100644
index 0000000..a4b17ac
--- /dev/null
+++ b/library/src/main/res/layout/kau_iitem_cutout.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ca.allanwang.kau.views.CutoutView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/kau_cutout"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/kau_about_header_height"
+ android:minHeight="@dimen/kau_about_header_height"
+ app:foregroundColor="?android:colorAccent"
+ app:heightPercentageToScreen="0.5" /> \ No newline at end of file
diff --git a/library/src/main/res/layout/kau_recycler_detached_background.xml b/library/src/main/res/layout/kau_recycler_detached_background.xml
new file mode 100644
index 0000000..7295d66
--- /dev/null
+++ b/library/src/main/res/layout/kau_recycler_detached_background.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout 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">
+
+ <!-- we use a parallel view for the background rather than just setting a background on the
+ recycler view for a nicer return transition. i.e. we want the background to fade and the
+ list to slide out separately -->
+ <View
+ android:id="@+id/kau_recycler_detached_background"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="?android:colorBackground" />
+
+ <!--defaults to a LinearLayoutManager-->
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/kau_recycler_detached"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:clipToPadding="false"
+ android:paddingBottom="@dimen/kau_spacing_normal"
+ android:scrollbars="vertical"
+ app:layoutManager="android.support.v7.widget.LinearLayoutManager" />
+
+</FrameLayout>
diff --git a/library/src/main/res/layout/kau_search_item.xml b/library/src/main/res/layout/kau_search_iitem.xml
index efd7260..efd7260 100644
--- a/library/src/main/res/layout/kau_search_item.xml
+++ b/library/src/main/res/layout/kau_search_iitem.xml