aboutsummaryrefslogtreecommitdiff
path: root/library/src/main/res
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-27 20:00:44 -0700
committerAllan Wang <me@allanwang.ca>2017-06-27 20:00:44 -0700
commita6ee77a4f1d78252b15059d51f2533fa03483d8c (patch)
treeb27b4a9cddfccce6f1edcdcdffba92c08bf33642 /library/src/main/res
parent8179e50208192e2b18b4df3bfc100d9cf779891a (diff)
downloadkau-a6ee77a4f1d78252b15059d51f2533fa03483d8c.tar.gz
kau-a6ee77a4f1d78252b15059d51f2533fa03483d8c.tar.bz2
kau-a6ee77a4f1d78252b15059d51f2533fa03483d8c.zip
Testing about activity and chained adapters
Diffstat (limited to 'library/src/main/res')
-rw-r--r--library/src/main/res/layout/kau_about_item_library.xml107
-rw-r--r--library/src/main/res/layout/kau_about_item_main.xml106
-rw-r--r--library/src/main/res/layout/kau_activity_about.xml4
-rw-r--r--library/src/main/res/layout/kau_activity_kpref.xml5
-rw-r--r--library/src/main/res/values/attr.xml8
-rw-r--r--library/src/main/res/values/ids.xml2
-rw-r--r--library/src/main/res/values/strings_about.xml4
-rw-r--r--library/src/main/res/values/styles.xml8
8 files changed, 230 insertions, 14 deletions
diff --git a/library/src/main/res/layout/kau_about_item_library.xml b/library/src/main/res/layout/kau_about_item_library.xml
new file mode 100644
index 0000000..5730d67
--- /dev/null
+++ b/library/src/main/res/layout/kau_about_item_library.xml
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@id/rippleForegroundListenerView"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="8dp"
+ android:clickable="true"
+ android:foreground="?selectableItemBackground"
+ android:layoutDirection="ltr">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="6dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp">
+
+ <TextView
+ android:id="@+id/libraryName"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="5"
+ android:ellipsize="end"
+ android:gravity="start"
+ android:maxLines="1"
+ android:textSize="@dimen/textSizeLarge_openSource"
+ android:textStyle="normal"
+ tools:text="Library name" />
+
+ <TextView
+ android:id="@+id/libraryCreator"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="2dp"
+ android:layout_weight="2"
+ android:gravity="end"
+ android:maxLines="2"
+ android:textSize="@dimen/textSizeSmall_openSource"
+ android:textStyle="normal"
+ tools:text="Creator" />
+ </LinearLayout>
+
+ <View
+ android:id="@+id/libraryDescriptionDivider"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:layout_marginTop="4dp" />
+
+ <TextView
+ android:id="@+id/libraryDescription"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:maxLines="20"
+ android:padding="8dp"
+ android:textSize="@dimen/textSizeSmall_openSource"
+ android:textStyle="normal"
+ tools:text="Description"/>
+
+ <View
+ android:id="@+id/libraryBottomDivider"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:layout_marginTop="4dp" />
+
+ <LinearLayout
+ android:id="@+id/libraryBottomContainer"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:paddingTop="4dp">
+
+ <TextView
+ android:id="@+id/libraryVersion"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:gravity="start"
+ android:maxLines="1"
+ android:textSize="@dimen/textSizeSmall_openSource"
+ android:textStyle="normal"
+ tools:text="Version" />
+
+ <TextView
+ android:id="@+id/libraryLicense"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:gravity="end"
+ android:maxLines="1"
+ android:textSize="@dimen/textSizeSmall_openSource"
+ android:textStyle="normal"
+ tools:text="License" />
+ </LinearLayout>
+ </LinearLayout>
+</android.support.v7.widget.CardView> \ No newline at end of file
diff --git a/library/src/main/res/layout/kau_about_item_main.xml b/library/src/main/res/layout/kau_about_item_main.xml
new file mode 100644
index 0000000..96ba110
--- /dev/null
+++ b/library/src/main/res/layout/kau_about_item_main.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:id="@+id/container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dp"
+ android:layout_marginTop="8dp"
+ android:clickable="true"
+ android:background="?selectableItemBackground">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="6dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp">
+
+ <TextView
+ android:id="@+id/title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="5"
+ android:ellipsize="end"
+ android:gravity="start"
+ android:maxLines="1"
+ android:textSize="@dimen/textSizeLarge_openSource"
+ android:textStyle="normal"
+ tools:text="App name" />
+
+ <TextView
+ android:id="@+id/creator"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="2dp"
+ android:layout_weight="2"
+ android:gravity="end"
+ android:maxLines="2"
+ android:textSize="@dimen/textSizeSmall_openSource"
+ android:textStyle="normal"
+ tools:text="Creator" />
+ </LinearLayout>
+
+ <View
+ android:id="@+id/top_divider"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:layout_marginTop="4dp" />
+
+ <TextView
+ android:id="@+id/description"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:maxLines="20"
+ android:padding="8dp"
+ android:textSize="@dimen/textSizeSmall_openSource"
+ android:textStyle="normal"
+ tools:text="Description"/>
+
+ <View
+ android:id="@+id/bottom_divider"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:layout_marginTop="4dp" />
+
+ <LinearLayout
+ android:id="@+id/bottom_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingLeft="8dp"
+ android:paddingRight="8dp"
+ android:paddingTop="4dp">
+
+ <TextView
+ android:id="@+id/version"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:gravity="start"
+ android:maxLines="1"
+ android:textSize="@dimen/textSizeSmall_openSource"
+ android:textStyle="normal"
+ tools:text="Version" />
+
+ <TextView
+ android:id="@+id/license"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:gravity="end"
+ android:maxLines="1"
+ android:textSize="@dimen/textSizeSmall_openSource"
+ android:textStyle="normal"
+ tools:text="License" />
+ </LinearLayout>
+ </LinearLayout>
+</android.support.v7.widget.CardView> \ No newline at end of file
diff --git a/library/src/main/res/layout/kau_activity_about.xml b/library/src/main/res/layout/kau_activity_about.xml
index 21d9306..a42cbe8 100644
--- a/library/src/main/res/layout/kau_activity_about.xml
+++ b/library/src/main/res/layout/kau_activity_about.xml
@@ -13,12 +13,12 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
- <ca.allanwang.kau.views.TextSlider
+ <ca.allanwang.kau.views.KauTextSlider
android:id="@+id/kau_toolbar_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
- android:textAppearance="@style/TextAppearance.AppCompat.Title" />
+ app:kau_animation_type="slide_vertical" />
</android.support.v7.widget.Toolbar>
diff --git a/library/src/main/res/layout/kau_activity_kpref.xml b/library/src/main/res/layout/kau_activity_kpref.xml
index e4e7b97..2281c45 100644
--- a/library/src/main/res/layout/kau_activity_kpref.xml
+++ b/library/src/main/res/layout/kau_activity_kpref.xml
@@ -24,13 +24,12 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
- <ca.allanwang.kau.views.TextSlider
+ <ca.allanwang.kau.views.KauTextSlider
android:id="@+id/kau_toolbar_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
- android:textAppearance="@style/TextAppearance.AppCompat.Title"
- android:textColor="@android:color/white" />
+ app:kau_animation_type="slide_horizontal" />
</android.support.v7.widget.Toolbar>
diff --git a/library/src/main/res/values/attr.xml b/library/src/main/res/values/attr.xml
index 894a069..14ae027 100644
--- a/library/src/main/res/values/attr.xml
+++ b/library/src/main/res/values/attr.xml
@@ -6,4 +6,12 @@
<attr name="kau_maxHeightPercent" format="float" />
</declare-styleable>
+ <declare-styleable name="KauTextSlider">
+ <attr name="kau_animation_type" format="enum">
+ <enum name="none" value="1000" />
+ <enum name="slide_horizontal" value="1001" />
+ <enum name="slide_vertical" value="1002" />
+ </attr>
+ </declare-styleable>
+
</resources> \ No newline at end of file
diff --git a/library/src/main/res/values/ids.xml b/library/src/main/res/values/ids.xml
index cda9faa..a21175a 100644
--- a/library/src/main/res/values/ids.xml
+++ b/library/src/main/res/values/ids.xml
@@ -8,4 +8,6 @@
<item name="kau_item_pref_sub_item" type="id" />
<item name="kau_item_pref_plain_text" type="id" />
<item name="kau_item_search" type="id" />
+ <item name="kau_item_about_library" type="id" />
+ <item name="kau_item_about_main" type="id" />
</resources> \ No newline at end of file
diff --git a/library/src/main/res/values/strings_about.xml b/library/src/main/res/values/strings_about.xml
index 2c3f9a1..be891d2 100644
--- a/library/src/main/res/values/strings_about.xml
+++ b/library/src/main/res/values/strings_about.xml
@@ -1,5 +1,7 @@
<resources xmlns:tools="http://schemas.android.com/tools">
- <string name="define_int_kau" tools:ignore="ResourceName" />
+ <string name="kau_dependencies_used">Dependencies Used</string>
+
+ <string name="define_kau" tools:ignore="ResourceName" />
<!-- Author section -->
<string name="library_kau_author" tools:ignore="ResourceName">Allan Wang</string>
<string name="library_kau_authorWebsite" tools:ignore="ResourceName">https://www.allanwang.ca/dev/</string>
diff --git a/library/src/main/res/values/styles.xml b/library/src/main/res/values/styles.xml
deleted file mode 100644
index c8e2197..0000000
--- a/library/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
- <style name="KauSearchView" parent="Widget.AppCompat.SearchView.ActionBar">
-
- </style>
-
-</resources> \ No newline at end of file