aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/README.md2
-rw-r--r--core/src/main/res-public/values-v21/styles.xml13
-rw-r--r--core/src/main/res-public/values/colors.xml4
-rw-r--r--core/src/main/res-public/values/public.xml2
-rw-r--r--core/src/main/res-public/values/styles.xml9
5 files changed, 30 insertions, 0 deletions
diff --git a/core/README.md b/core/README.md
index 998226b..2c8ae9d 100644
--- a/core/README.md
+++ b/core/README.md
@@ -176,6 +176,8 @@ kauSwipeOnDestroy() //in the onDestroy method
kauSwipeFinish() //optional; replace onBackPressed with this to animate the activity finish
```
+For the best results, activities should be translucent. See `Kau.Transparent` for a base style example.
+
Special thanks goes to the original project, [SwipeBackHelper](https://github.com/Jude95/SwipeBackHelper)
KAU's swipe is a Kotlin rewrite, along with support for all directions and weakly referenced contexts.
diff --git a/core/src/main/res-public/values-v21/styles.xml b/core/src/main/res-public/values-v21/styles.xml
new file mode 100644
index 0000000..1157c37
--- /dev/null
+++ b/core/src/main/res-public/values-v21/styles.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <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>
+</resources> \ No newline at end of file
diff --git a/core/src/main/res-public/values/colors.xml b/core/src/main/res-public/values/colors.xml
new file mode 100644
index 0000000..82bf172
--- /dev/null
+++ b/core/src/main/res-public/values/colors.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<resources>
+ <color name="kau_shadow_overlay">#80000000</color>
+</resources>
diff --git a/core/src/main/res-public/values/public.xml b/core/src/main/res-public/values/public.xml
index fb1c9df..2163b10 100644
--- a/core/src/main/res-public/values/public.xml
+++ b/core/src/main/res-public/values/public.xml
@@ -22,6 +22,7 @@
<public name='kau_exit_slide_left' type='transition' />
<public name='kau_exit_slide_right' type='transition' />
<public name='kau_exit_slide_top' type='transition' />
+ <public name='kau_shadow_overlay' type='color' />
<public name='kau_activity_horizontal_margin' type='dimen' />
<public name='kau_activity_vertical_margin' type='dimen' />
<public name='kau_dialog_margin' type='dimen' />
@@ -106,6 +107,7 @@
<public name='kau_0' type='string' />
<public name='kau_bullet_point' type='string' />
<public name='Kau' type='style' />
+ <public name='Kau.Translucent' type='style' />
<public name='KauFadeIn' type='style' />
<public name='KauFadeInFadeOut' type='style' />
<public name='KauSlideInRight' type='style' />
diff --git a/core/src/main/res-public/values/styles.xml b/core/src/main/res-public/values/styles.xml
index f6f1929..bdbc84f 100644
--- a/core/src/main/res-public/values/styles.xml
+++ b/core/src/main/res-public/values/styles.xml
@@ -1,4 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<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>
+ </style>
</resources>