aboutsummaryrefslogtreecommitdiff
path: root/core-ui/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to 'core-ui/src/main/res')
-rw-r--r--core-ui/src/main/res/layout/kau_recycler_detached_background.xml27
-rw-r--r--core-ui/src/main/res/layout/kau_recycler_textslider.xml34
-rw-r--r--core-ui/src/main/res/values/attr.xml41
-rw-r--r--core-ui/src/main/res/values/colors.xml6
-rw-r--r--core-ui/src/main/res/values/styles.xml20
5 files changed, 128 insertions, 0 deletions
diff --git a/core-ui/src/main/res/layout/kau_recycler_detached_background.xml b/core-ui/src/main/res/layout/kau_recycler_detached_background.xml
new file mode 100644
index 0000000..7295d66
--- /dev/null
+++ b/core-ui/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/core-ui/src/main/res/layout/kau_recycler_textslider.xml b/core-ui/src/main/res/layout/kau_recycler_textslider.xml
new file mode 100644
index 0000000..1402cfb
--- /dev/null
+++ b/core-ui/src/main/res/layout/kau_recycler_textslider.xml
@@ -0,0 +1,34 @@
+<?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">
+
+ <android.support.v7.widget.Toolbar
+ android:id="@+id/kau_toolbar"
+ android:layout_width="0dp"
+ android:layout_height="?attr/actionBarSize"
+ 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_vertical" />
+
+ </android.support.v7.widget.Toolbar>
+
+ <android.support.v7.widget.RecyclerView
+ android:id="@+id/kau_recycler"
+ 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/core-ui/src/main/res/values/attr.xml b/core-ui/src/main/res/values/attr.xml
new file mode 100644
index 0000000..49be8d9
--- /dev/null
+++ b/core-ui/src/main/res/values/attr.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="ResourceName">
+
+ <declare-styleable name="BoundedCardView">
+ <attr name="maxHeight" format="dimension" />
+ <attr name="maxHeightPercent" format="float" />
+ </declare-styleable>
+
+ <declare-styleable name="TextSlider">
+ <attr name="animation_type" format="enum">
+ <enum name="none" value="1000" />
+ <enum name="slide_horizontal" value="1001" />
+ <enum name="slide_vertical" value="1002" />
+ </attr>
+ </declare-styleable>
+
+ <declare-styleable name="InkPageIndicator">
+ <attr name="dotDiameter" format="dimension" />
+ <attr name="dotGap" format="dimension" />
+ <attr name="animationDuration" format="integer" />
+ <attr name="pageIndicatorColor" format="color" />
+ <attr name="currentPageIndicatorColor" format="color" />
+ </declare-styleable>
+
+ <declare-styleable name="ElasticDragDismissFrameLayout">
+ <attr name="dragDismissDistance" format="dimension" />
+ <attr name="dragDismissFraction" format="float" />
+ <attr name="dragDismissScale" format="float" />
+ <attr name="dragElasticity" format="float" />
+ </declare-styleable>
+
+ <declare-styleable name="CutoutView">
+ <attr name="foregroundColor" format="color" />
+ <attr name="android:text" />
+ <attr name="android:drawable" />
+ <attr name="android:minHeight" />
+ <attr name="heightPercentageToScreen" format="float" />
+ <attr name="font"/>
+ </declare-styleable>
+
+</resources> \ No newline at end of file
diff --git a/core-ui/src/main/res/values/colors.xml b/core-ui/src/main/res/values/colors.xml
new file mode 100644
index 0000000..6d51597
--- /dev/null
+++ b/core-ui/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+<resources>
+ <color name="kau_shadow_overlay">#80000000</color>
+
+ <color name="kau_about_page_indicator_dark">#80ffffff</color>
+ <color name="kau_about_page_indicator_dark_selected">#fff</color>
+</resources>
diff --git a/core-ui/src/main/res/values/styles.xml b/core-ui/src/main/res/values/styles.xml
new file mode 100644
index 0000000..f9fd7d4
--- /dev/null
+++ b/core-ui/src/main/res/values/styles.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <style name="Kau" parent="Theme.AppCompat.NoActionBar" />
+
+ <style name="Kau.Translucent">
+ <item name="android:windowBackground">@color/kau_shadow_overlay</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowContentOverlay">@null</item>
+ <item name="android:windowIsFloating">false</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+ </style>
+
+ <style name="Kau.Translucent.NoAnimation">
+ <item name="android:windowAnimationStyle">@null</item>
+ </style>
+
+</resources> \ No newline at end of file