Refactor bottom action bar layout

It is used in both the wallpaper preview screen and the app grid screen. Moved option_border

Screenshot: https://screenshot.googleplex.com/8MYhUSd37Jk6wET.png

Bug: 185324244
Test: manual
Change-Id: I6a17f5ef348f5fe2d558f36c532b9f610732cacc
diff --git a/res/drawable/option_border.xml b/res/drawable/option_border.xml
deleted file mode 100644
index be9e4b2..0000000
--- a/res/drawable/option_border.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
-     Copyright (C) 2019 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
-    android:color="?android:attr/colorControlHighlight">
-    <item android:id="@android:id/mask">
-        <shape android:shape="rectangle">
-            <solid android:color="@android:color/white"/>
-            <corners android:radius="?android:dialogCornerRadius" />
-        </shape>
-    </item>
-    <item>
-        <shape android:shape="rectangle">
-            <solid android:color="?androidprv:attr/colorSurface"/>
-            <corners android:radius="?android:dialogCornerRadius" />
-        </shape>
-    </item>
-</ripple>
diff --git a/res/layout/activity_individual_picker.xml b/res/layout/activity_individual_picker.xml
index ae0f96b..222c7cb 100755
--- a/res/layout/activity_individual_picker.xml
+++ b/res/layout/activity_individual_picker.xml
@@ -41,7 +41,7 @@
             android:id="@+id/fragment_container"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginBottom="@dimen/bottom_navbar_height"/>
+            android:layout_marginBottom="@dimen/bottom_actions_height"/>
 
         <include layout="@layout/bottom_action_bar" />
     </FrameLayout>
diff --git a/res/layout/bottom_action_bar.xml b/res/layout/bottom_action_bar.xml
index cfee9d5..c927d1e 100644
--- a/res/layout/bottom_action_bar.xml
+++ b/res/layout/bottom_action_bar.xml
@@ -18,5 +18,4 @@
     android:id="@+id/bottom_actionbar"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_gravity="bottom"
     android:visibility="gone" />
diff --git a/res/layout/bottom_actions_layout.xml b/res/layout/bottom_actions_layout.xml
index 21039b8..92b5dc1 100644
--- a/res/layout/bottom_actions_layout.xml
+++ b/res/layout/bottom_actions_layout.xml
@@ -42,7 +42,9 @@
     <androidx.constraintlayout.widget.ConstraintLayout
         android:id="@+id/action_tabs"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/bottom_navbar_height"
+        android:layout_height="@dimen/bottom_actions_height"
+        android:paddingTop="@dimen/bottom_actions_top_padding"
+        android:paddingBottom="@dimen/bottom_actions_bottom_padding"
         android:clickable="true"
         android:background="?android:colorBackground"
         android:theme="@style/BottomActionItemStyle"
@@ -57,6 +59,7 @@
             android:contentDescription="@string/bottom_action_bar_back"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_rotation"
             app:layout_constraintHorizontal_chainStyle="spread_inside"
             app:layout_constraintStart_toStartOf="parent" />
@@ -69,6 +72,7 @@
             android:contentDescription="@string/bottom_action_bar_slideshow_wallpaper"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_delete"
             app:layout_constraintStart_toEndOf="@id/action_back" />
 
@@ -79,9 +83,10 @@
             android:contentDescription="@string/delete_live_wallpaper"
             android:src="@drawable/ic_delete_24px"
             android:visibility="gone"
+            app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_information"
-            app:layout_constraintStart_toEndOf="@id/action_rotation"
-            app:layout_constraintTop_toTopOf="parent" />
+            app:layout_constraintStart_toEndOf="@id/action_rotation" />
 
         <ImageView
             android:id="@+id/action_information"
@@ -91,6 +96,7 @@
             android:contentDescription="@string/tab_info"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_edit"
             app:layout_constraintStart_toEndOf="@id/action_delete" />
 
@@ -102,6 +108,7 @@
             android:contentDescription="@string/bottom_action_bar_edit"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_customize"
             app:layout_constraintStart_toEndOf="@id/action_information" />
 
@@ -113,6 +120,7 @@
             android:contentDescription="@string/tab_customize"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_download"
             app:layout_constraintStart_toEndOf="@id/action_edit" />
 
@@ -124,6 +132,7 @@
             android:contentDescription="@string/bottom_action_bar_download"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_progress"
             app:layout_constraintStart_toEndOf="@id/action_customize" />
 
@@ -133,6 +142,7 @@
             android:layout_height="@dimen/bottom_action_button_height"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_apply"
             app:layout_constraintStart_toEndOf="@id/action_download" />
 
@@ -144,6 +154,7 @@
             android:contentDescription="@string/bottom_action_bar_apply"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
+            app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
             app:layout_constraintStart_toEndOf="@id/action_progress" />
 
diff --git a/res/layout/fragment_image_preview_v2.xml b/res/layout/fragment_image_preview_v2.xml
index 61b1b35..2c8cdfe 100644
--- a/res/layout/fragment_image_preview_v2.xml
+++ b/res/layout/fragment_image_preview_v2.xml
@@ -24,7 +24,7 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_marginBottom="@dimen/bottom_navbar_height"
+        android:layout_marginBottom="@dimen/bottom_actions_height"
         android:orientation="vertical">
 
         <FrameLayout
diff --git a/res/layout/fragment_live_preview_v2.xml b/res/layout/fragment_live_preview_v2.xml
index 12b4298..7851107 100644
--- a/res/layout/fragment_live_preview_v2.xml
+++ b/res/layout/fragment_live_preview_v2.xml
@@ -24,7 +24,7 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_marginBottom="@dimen/bottom_navbar_height"
+        android:layout_marginBottom="@dimen/bottom_actions_height"
         android:orientation="vertical">
 
         <FrameLayout
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index cbd4afe..f8fbd29 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -140,10 +140,11 @@
     <dimen name="full_preview_page_default_padding_bottom">32dp</dimen>
 
     <!-- Dimensions for the bottom bar. -->
-    <dimen name="bottom_navbar_height">96dp</dimen>
+    <dimen name="bottom_actions_height">84dp</dimen>
+    <dimen name="bottom_actions_top_padding">24dp</dimen>
+    <dimen name="bottom_actions_bottom_padding">12dp</dimen>
     <dimen name="bottom_action_button_width">72dp</dimen>
     <dimen name="bottom_action_button_height">48dp</dimen>
-    <dimen name="bottom_action_button_margin_top">24dp</dimen>
     <dimen name="bottom_action_button_padding_horizontal">26dp</dimen>
     <dimen name="bottom_action_button_radius">100dp</dimen>
 
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 7db87d8..893ea49 100755
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -184,7 +184,6 @@
         <item name="android:tint">@color/bottom_action_button_color_tint</item>
         <item name="android:background">@drawable/bottom_action_button_background</item>
         <item name="android:paddingHorizontal">@dimen/bottom_action_button_padding_horizontal</item>
-        <item name="android:layout_marginTop">@dimen/bottom_action_button_margin_top</item>
     </style>
 
     <!-- Option tiles -->