summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2020-02-13 00:23:59 +0100
committerJavier <dev.git@javispedro.com>2020-02-13 00:35:48 +0100
commitcdbc20ef11639e8e953a88b458c3046dfc26bd5d (patch)
treee55a76815b3534df922b8a51d2a17dca476f171b
parentdc93a3e70dee8e715fdd4b1897dfb24855705d91 (diff)
downloadwallmotion-cdbc20ef11639e8e953a88b458c3046dfc26bd5d.tar.gz
wallmotion-cdbc20ef11639e8e953a88b458c3046dfc26bd5d.zip
use translucent actionbar & system UI
-rw-r--r--app/src/main/AndroidManifest.xml2
-rw-r--r--app/src/main/res/layout/activity_main.xml44
-rw-r--r--app/src/main/res/values/colors.xml9
-rw-r--r--app/src/main/res/values/styles.xml5
4 files changed, 38 insertions, 22 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 2d010dd..9be4d60 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -33,7 +33,7 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
- android:theme="@style/AppTheme.NoActionBar">
+ android:theme="@style/AppTheme.Translucent">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index f195562..4521d0a 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -11,26 +11,34 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
- <com.google.android.material.appbar.AppBarLayout
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:theme="@style/AppTheme.AppBarOverlay">
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
- <androidx.appcompat.widget.Toolbar
- android:id="@+id/toolbar"
+ <com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- android:background="?attr/colorPrimary"
- app:popupTheme="@style/AppTheme.PopupOverlay" />
-
- </com.google.android.material.appbar.AppBarLayout>
-
- <com.google.android.material.floatingactionbutton.FloatingActionButton
- android:id="@+id/set_wallpaper"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom|end"
- android:layout_margin="@dimen/fab_margin"
- app:srcCompat="@drawable/ic_action_wallpaper" />
+ android:layout_height="wrap_content"
+ android:background="@color/colorPrimaryTranslucent"
+ app:elevation="0dp"
+ android:theme="@style/AppTheme.AppBarOverlay">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ app:popupTheme="@style/AppTheme.PopupOverlay" />
+
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/set_wallpaper"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom|end"
+ android:layout_margin="@dimen/fab_margin"
+ app:srcCompat="@drawable/ic_action_wallpaper" />
+ </FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 69b2233..e3207b3 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <color name="colorPrimary">#008577</color>
- <color name="colorPrimaryDark">#00574B</color>
- <color name="colorAccent">#D81B60</color>
+ <color name="colorPrimary">#A4A633</color>
+ <color name="colorPrimaryDark">#747613</color>
+ <color name="colorAccent">#D4B643</color>
+
+ <color name="colorPrimaryTranslucent">#30656545</color>
+ <color name="colorPrimaryDarkTranslucent">#88747613</color>
</resources>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 545b9c6..db74c72 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -13,6 +13,11 @@
<item name="windowNoTitle">true</item>
</style>
+ <style name="AppTheme.Translucent" parent="AppTheme.NoActionBar">
+ <item name="android:windowTranslucentStatus">true</item>
+ <item name="android:windowTranslucentNavigation">true</item>
+ </style>
+
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />