summaryrefslogtreecommitdiff
path: root/app/src/main/res/layout
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2020-08-20 18:36:06 +0200
committerJavier <dev.git@javispedro.com>2020-08-20 18:36:06 +0200
commit4fe050905b367e649ae320110dbacc7686201679 (patch)
tree63dc67d72dc646f43c1a9db4c1ee9384aa754b72 /app/src/main/res/layout
parent52aa7ea0653772783f2bb16453e1ad55a915a1d7 (diff)
downloadwallmotion-4fe050905b367e649ae320110dbacc7686201679.tar.gz
wallmotion-4fe050905b367e649ae320110dbacc7686201679.zip
improve fab layout behaviorHEADmaster
Diffstat (limited to 'app/src/main/res/layout')
-rw-r--r--app/src/main/res/layout/activity_main.xml16
1 files changed, 11 insertions, 5 deletions
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 3081e15..7724c90 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -6,6 +6,9 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
+ <!-- This layout will overlap with the system windows,
+ so use it for the video window -->
+
<SurfaceView
android:id="@+id/wallpaper_view"
android:layout_width="match_parent"
@@ -16,12 +19,14 @@
android:layout_height="match_parent"
android:fitsSystemWindows="true">
+ <!-- But everything here will not -->
+
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimaryTranslucent"
- app:elevation="0dp"
- android:theme="@style/AppTheme.AppBarOverlay">
+ android:theme="@style/AppTheme.AppBarOverlay"
+ app:elevation="0dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
@@ -29,28 +34,29 @@
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay" />
-
</com.google.android.material.appbar.AppBarLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
- android:layout_margin="@dimen/fab_margin"
android:orientation="vertical">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/set_file"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_marginHorizontal="@dimen/fab_margin"
+ android:layout_marginTop="@dimen/fab_margin"
app:srcCompat="@drawable/ic_action_video_library" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/set_wallpaper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/fab_margin"
+ android:layout_margin="@dimen/fab_margin"
app:srcCompat="@drawable/ic_action_wallpaper" />
+
</LinearLayout>
</FrameLayout>