aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity/src/main/res/layout
diff options
context:
space:
mode:
Diffstat (limited to 'kpref-activity/src/main/res/layout')
-rw-r--r--kpref-activity/src/main/res/layout/kau_pref_activity.xml54
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference.xml108
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_checkbox.xml7
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_color_preview.xml6
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_header.xml10
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_seekbar.xml8
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_seekbar_text.xml12
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_text.xml7
8 files changed, 212 insertions, 0 deletions
diff --git a/kpref-activity/src/main/res/layout/kau_pref_activity.xml b/kpref-activity/src/main/res/layout/kau_pref_activity.xml
new file mode 100644
index 0000000..d068618
--- /dev/null
+++ b/kpref-activity/src/main/res/layout/kau_pref_activity.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:id="@+id/kau_container"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <ca.allanwang.kau.ui.views.RippleCanvas
+ android:id="@+id/kau_toolbar_ripple"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintBottom_toBottomOf="@+id/kau_toolbar"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <android.support.v7.widget.Toolbar
+ android:id="@id/kau_toolbar"
+ android:layout_width="0dp"
+ android:layout_height="?attr/actionBarSize"
+ android:layout_marginTop="@dimen/kau_status_bar_height"
+ android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
+
+ <ca.allanwang.kau.widgets.TextSlider
+ android:id="@+id/kau_toolbar_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ app:animation_type="slide_horizontal" />
+
+ </android.support.v7.widget.Toolbar>
+
+ <ca.allanwang.kau.ui.views.RippleCanvas
+ android:id="@+id/kau_ripple"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/kau_toolbar" />
+
+ <ViewAnimator
+ android:id="@+id/kau_holder"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toBottomOf="@id/kau_toolbar" />
+
+</android.support.constraint.ConstraintLayout>
diff --git a/kpref-activity/src/main/res/layout/kau_preference.xml b/kpref-activity/src/main/res/layout/kau_preference.xml
new file mode 100644
index 0000000..1a53726
--- /dev/null
+++ b/kpref-activity/src/main/res/layout/kau_preference.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--due to animations, we need a wrapper viewgroup so our changes will stick-->
+
+<LinearLayout 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"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:baselineAligned="false"
+ android:clipToPadding="false"
+ android:minHeight="?android:attr/listPreferredItemHeightSmall"
+ android:orientation="horizontal">
+
+ <android.support.constraint.ConstraintLayout
+ android:id="@id/kau_pref_container"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?android:attr/selectableItemBackground"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
+ android:paddingStart="?android:attr/listPreferredItemPaddingStart">
+
+ <!--As per Android N, icons (24dp) are aligned to the left rather than centered-->
+
+ <ImageView
+ android:id="@id/kau_pref_icon"
+ android:layout_width="56dp"
+ android:layout_height="56dp"
+ android:layout_marginBottom="4dp"
+ android:layout_marginTop="4dp"
+ android:contentDescription="@string/kau_pref_icon"
+ android:paddingEnd="32dp"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintStart_toStartOf="parent"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.5"
+ tools:layout_editor_absoluteX="0dp" />
+
+ <TextView
+ android:id="@id/kau_pref_title"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="@dimen/kau_padding_normal"
+ android:ellipsize="marquee"
+ android:textAppearance="?android:attr/textAppearanceListItem"
+ android:textColor="?android:attr/textColorPrimary"
+ app:layout_constraintBottom_toTopOf="@id/kau_pref_desc"
+ app:layout_constraintEnd_toStartOf="@id/kau_pref_inner_frame"
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constraintStart_toEndOf="@id/kau_pref_icon"
+ app:layout_constraintTop_toTopOf="parent"
+ tools:layout_editor_absoluteX="-175dp" />
+
+ <TextView
+ android:id="@id/kau_pref_desc"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:maxLines="10"
+ android:textAppearance="?android:attr/textAppearanceListItemSecondary"
+ android:textColor="?android:attr/textColorSecondary"
+ app:layout_constraintBottom_toTopOf="@id/kau_pref_lower_frame"
+ app:layout_constraintEnd_toStartOf="@id/kau_pref_inner_frame"
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constraintStart_toEndOf="@id/kau_pref_icon"
+ app:layout_constraintTop_toBottomOf="@id/kau_pref_title"
+ tools:layout_editor_absoluteX="-175dp" />
+
+ <LinearLayout
+ android:id="@id/kau_pref_lower_frame"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="@dimen/kau_padding_normal"
+ android:orientation="vertical"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toStartOf="@id/kau_pref_inner_frame"
+ app:layout_constraintHorizontal_bias="0"
+ app:layout_constraintStart_toEndOf="@id/kau_pref_icon"
+ app:layout_constraintTop_toBottomOf="@id/kau_pref_desc"
+ tools:layout_editor_absoluteX="-175dp" />
+
+ <android.support.constraint.Barrier
+ android:id="@id/kau_pref_barrier"
+ android:layout_width="1dp"
+ android:layout_height="wrap_content"
+ app:barrierDirection="end"
+ app:constraint_referenced_ids="kau_pref_title,kau_pref_desc,kau_pref_lower_frame"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toTopOf="parent" />
+
+ <LinearLayout
+ android:id="@id/kau_pref_inner_frame"
+ android:layout_width="wrap_content"
+ android:layout_height="0dp"
+ android:gravity="center_vertical|end"
+ android:orientation="horizontal"
+ android:paddingStart="@dimen/kau_padding_normal"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintEnd_toEndOf="parent"
+ app:layout_constraintHorizontal_bias="1.0"
+ app:layout_constraintStart_toEndOf="@id/kau_pref_barrier"
+ app:layout_constraintTop_toTopOf="parent"
+ app:layout_constraintVertical_bias="0.5"
+ tools:layout_editor_absoluteX="1dp" />
+
+ </android.support.constraint.ConstraintLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/kpref-activity/src/main/res/layout/kau_preference_checkbox.xml b/kpref-activity/src/main/res/layout/kau_preference_checkbox.xml
new file mode 100644
index 0000000..016394f
--- /dev/null
+++ b/kpref-activity/src/main/res/layout/kau_preference_checkbox.xml
@@ -0,0 +1,7 @@
+<CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@id/kau_pref_inner_content"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="false"
+ android:clickable="false"
+ android:background="@null" /> \ No newline at end of file
diff --git a/kpref-activity/src/main/res/layout/kau_preference_color_preview.xml b/kpref-activity/src/main/res/layout/kau_preference_color_preview.xml
new file mode 100644
index 0000000..fbb049b
--- /dev/null
+++ b/kpref-activity/src/main/res/layout/kau_preference_color_preview.xml
@@ -0,0 +1,6 @@
+<ca.allanwang.kau.colorpicker.CircleView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@id/kau_pref_inner_content"
+ android:layout_width="40dp"
+ android:layout_height="40dp"
+ android:focusable="false"
+ android:clickable="false" /> \ No newline at end of file
diff --git a/kpref-activity/src/main/res/layout/kau_preference_header.xml b/kpref-activity/src/main/res/layout/kau_preference_header.xml
new file mode 100644
index 0000000..5deece3
--- /dev/null
+++ b/kpref-activity/src/main/res/layout/kau_preference_header.xml
@@ -0,0 +1,10 @@
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/kau_pref_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="8dip"
+ android:paddingEnd="?android:attr/listPreferredItemPaddingRight"
+ android:paddingStart="?android:attr/listPreferredItemPaddingLeft"
+ android:paddingTop="16dip"
+ android:textColor="?android:attr/colorAccent"
+ android:textSize="14sp" /> \ No newline at end of file
diff --git a/kpref-activity/src/main/res/layout/kau_preference_seekbar.xml b/kpref-activity/src/main/res/layout/kau_preference_seekbar.xml
new file mode 100644
index 0000000..8da4d5d
--- /dev/null
+++ b/kpref-activity/src/main/res/layout/kau_preference_seekbar.xml
@@ -0,0 +1,8 @@
+<SeekBar xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@id/kau_pref_lower_content"
+ android:layout_width="match_parent"
+ android:paddingTop="@dimen/kau_padding_normal"
+ android:layout_height="wrap_content"
+ android:focusable="false"
+ android:clickable="false"
+ android:background="@null" /> \ No newline at end of file
diff --git a/kpref-activity/src/main/res/layout/kau_preference_seekbar_text.xml b/kpref-activity/src/main/res/layout/kau_preference_seekbar_text.xml
new file mode 100644
index 0000000..6ba2543
--- /dev/null
+++ b/kpref-activity/src/main/res/layout/kau_preference_seekbar_text.xml
@@ -0,0 +1,12 @@
+<!--TextView that aligns to the bottom-->
+
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@id/kau_pref_inner_content"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ android:background="@null"
+ android:clickable="false"
+ android:focusable="false"
+ android:gravity="bottom|end"
+ android:paddingBottom="@dimen/kau_padding_normal" /> \ No newline at end of file
diff --git a/kpref-activity/src/main/res/layout/kau_preference_text.xml b/kpref-activity/src/main/res/layout/kau_preference_text.xml
new file mode 100644
index 0000000..a4d901e
--- /dev/null
+++ b/kpref-activity/src/main/res/layout/kau_preference_text.xml
@@ -0,0 +1,7 @@
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@id/kau_pref_inner_content"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:focusable="false"
+ android:clickable="false"
+ android:background="@null" /> \ No newline at end of file