Aperture: Rename top and bottom bar to secondary and primary bar

Change-Id: Ibb3eea9fd8c63a70ee7e01793a5b0bc3eeff2f30
diff --git a/app/src/main/java/org/lineageos/aperture/MainActivity.kt b/app/src/main/java/org/lineageos/aperture/MainActivity.kt
index e2d7649..e66430f 100644
--- a/app/src/main/java/org/lineageos/aperture/MainActivity.kt
+++ b/app/src/main/java/org/lineageos/aperture/MainActivity.kt
@@ -92,7 +92,6 @@
 @androidx.camera.view.video.ExperimentalVideo
 class MainActivity : AppCompatActivity() {
     private val aspectRatioButton by lazy { findViewById<ToggleButton>(R.id.aspectRatioButton) }
-    private val bottomButtonsLayout by lazy { findViewById<ConstraintLayout>(R.id.bottomButtonsLayout) }
     private val cameraModeHighlight by lazy { findViewById<MaterialButton>(R.id.cameraModeHighlight) }
     private val countDownView by lazy { findViewById<CountDownView>(R.id.countDownView) }
     private val effectButton by lazy { findViewById<ImageButton>(R.id.effectButton) }
@@ -103,6 +102,7 @@
     private val gridView by lazy { findViewById<GridView>(R.id.gridView) }
     private val micButton by lazy { findViewById<ImageButton>(R.id.micButton) }
     private val photoModeButton by lazy { findViewById<MaterialButton>(R.id.photoModeButton) }
+    private val primaryBarLayout by lazy { findViewById<ConstraintLayout>(R.id.primaryBarLayout) }
     private val qrModeButton by lazy { findViewById<MaterialButton>(R.id.qrModeButton) }
     private val settingsButton by lazy { findViewById<ImageButton>(R.id.settingsButton) }
     private val shutterButton by lazy { findViewById<ImageButton>(R.id.shutterButton) }
@@ -249,7 +249,7 @@
         // Initialize sounds utils
         cameraSoundsUtils = CameraSoundsUtils(sharedPreferences)
 
-        // Set top bar button callbacks
+        // Set secondary bar button callbacks
         aspectRatioButton.setOnClickListener { cycleAspectRatio() }
         videoQualityButton.setOnClickListener { cycleVideoQuality() }
         effectButton.setOnClickListener { cyclePhotoEffects() }
@@ -359,7 +359,7 @@
             "%.1fx".format(cameraController.zoomState.value?.zoomRatio)
         }
 
-        // Set bottom bar button callbacks
+        // Set primary bar button callbacks
         qrModeButton.setOnClickListener { changeCameraMode(CameraMode.QR) }
         photoModeButton.setOnClickListener { changeCameraMode(CameraMode.PHOTO) }
         videoModeButton.setOnClickListener { changeCameraMode(CameraMode.VIDEO) }
@@ -722,15 +722,15 @@
         when (cameraMode) {
             CameraMode.QR -> {
                 timerButton.isVisible = false
-                bottomButtonsLayout.isInvisible = true
+                primaryBarLayout.isInvisible = true
             }
             CameraMode.PHOTO -> {
                 timerButton.isVisible = true
-                bottomButtonsLayout.isInvisible = false
+                primaryBarLayout.isInvisible = false
             }
             CameraMode.VIDEO -> {
                 timerButton.isVisible = true
-                bottomButtonsLayout.isInvisible = false
+                primaryBarLayout.isInvisible = false
             }
         }
 
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index fb49719..111b7b1 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -8,22 +8,22 @@
     tools:context=".MainActivity">
 
     <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/topButtonsLayout"
+        android:id="@+id/secondaryBarLayout"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:paddingStart="16dp"
         android:paddingTop="8dp"
         android:paddingEnd="16dp"
         android:paddingBottom="8dp"
-        app:layout_constraintBottom_toTopOf="@+id/bottomButtonsLayout"
+        app:layout_constraintBottom_toTopOf="@+id/primaryBarLayout"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent">
 
         <ImageButton
             android:id="@+id/timerButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/timer_button_description"
             android:src="@drawable/ic_timer_off"
@@ -36,9 +36,9 @@
 
         <ToggleButton
             android:id="@+id/aspectRatioButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/aspect_ratio_button_description"
             app:layout_constraintBottom_toBottomOf="parent"
@@ -49,9 +49,9 @@
 
         <ToggleButton
             android:id="@+id/videoQualityButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/video_quality_button_description"
             app:layout_constraintBottom_toBottomOf="parent"
@@ -62,9 +62,9 @@
 
         <ImageButton
             android:id="@+id/effectButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/effect_button_description"
             android:src="@drawable/ic_effect_none"
@@ -76,9 +76,9 @@
 
         <ImageButton
             android:id="@+id/gridButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/grid_button_description"
             android:src="@drawable/ic_grid_off"
@@ -90,9 +90,9 @@
 
         <ImageButton
             android:id="@+id/torchButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/torch_button_description"
             android:src="@drawable/ic_torch_on"
@@ -105,9 +105,9 @@
 
         <ImageButton
             android:id="@+id/flashButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/flash_button_description"
             android:src="@drawable/ic_flash_off"
@@ -120,9 +120,9 @@
 
         <ImageButton
             android:id="@+id/micButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/mic_button_description"
             android:src="@drawable/ic_mic_off"
@@ -135,9 +135,9 @@
 
         <ImageButton
             android:id="@+id/settingsButton"
-            style="@style/ApertureTopBarButton"
-            android:layout_width="@dimen/top_view_buttons_size"
-            android:layout_height="@dimen/top_view_buttons_size"
+            style="@style/ApertureSecondaryBarButton"
+            android:layout_width="@dimen/secondary_bar_button_size"
+            android:layout_height="@dimen/secondary_bar_button_size"
             android:background="?attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/settings_button_description"
             android:src="@drawable/ic_settings"
@@ -153,7 +153,7 @@
         android:id="@+id/viewFinder"
         android:layout_width="0dp"
         android:layout_height="0dp"
-        app:layout_constraintBottom_toTopOf="@+id/topButtonsLayout"
+        app:layout_constraintBottom_toTopOf="@+id/secondaryBarLayout"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="parent"
@@ -210,7 +210,7 @@
         app:layout_constraintStart_toStartOf="parent" />
 
     <androidx.constraintlayout.widget.ConstraintLayout
-        android:id="@+id/bottomButtonsLayout"
+        android:id="@+id/primaryBarLayout"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:paddingTop="8dp"
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 8552ac1..d8ac03c 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <dimen name="top_view_buttons_size">48dp</dimen>
+    <dimen name="secondary_bar_button_size">48dp</dimen>
 </resources>
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index 7a9990a..173ba14 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -38,15 +38,15 @@
         <item name="android:thumb">@drawable/settingslib_switch_thumb</item>
     </style>
 
-    <!-- Top bar icons theme -->
-    <style name="ApertureTopBarButton">
+    <!-- Secondary bar icons theme -->
+    <style name="ApertureSecondaryBarButton">
         <item name="tint">?attr/colorPrimary</item>
         <item name="backgroundTint">?attr/colorOnPrimary</item>
         <item name="android:padding">0dp</item>
         <item name="android:textColor">?attr/colorPrimary</item>
     </style>
 
-    <!-- Bottom bar icons theme -->
+    <!-- Camera mode bar icons theme -->
     <style name="ApertureModeSelectorButton" parent="@style/Widget.Material3.Button.TonalButton">
         <item name="android:backgroundTint">@color/camera_mode_selector_icon</item>
         <item name="android:textColor">@color/camera_mode_selector_text</item>
@@ -54,7 +54,7 @@
         <item name="android:typeface">monospace</item>
     </style>
 
-    <!-- Bottom bar icons highlight theme -->
+    <!-- Camera mode bar icons highlight theme -->
     <style name="ApertureModeSelectorButtonHighlight" parent="@style/ApertureModeSelectorButton">
         <item name="android:backgroundTint">@color/camera_mode_selector_icon_highlight</item>
     </style>