From 10cdb834281c0c37e6966173e67150e39917ccd7 Mon Sep 17 00:00:00 2001
From: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue, 28 Nov 2023 10:17:52 +0100
Subject: tdf#124480 android: Use MaterialToolbar and drop manual bg color

This ensures these 2 toolbars will also use the correct color
in dark mode once support for that is added in a subsequent
commit.

Change-Id: Idcea5096c4e4bdf8ddc6b28df0fc6df05074980b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160066
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
---
 android/source/res/layout/activity_document_browser.xml | 5 ++---
 android/source/res/layout/activity_main.xml             | 3 +--
 2 files changed, 3 insertions(+), 5 deletions(-)

(limited to 'android')

diff --git a/android/source/res/layout/activity_document_browser.xml b/android/source/res/layout/activity_document_browser.xml
index c4dcf3f0c8c1..e47426871f72 100644
--- a/android/source/res/layout/activity_document_browser.xml
+++ b/android/source/res/layout/activity_document_browser.xml
@@ -14,12 +14,11 @@
     android:orientation="vertical">
 
     <!-- The toolbar -->
-    <androidx.appcompat.widget.Toolbar
+    <com.google.android.material.appbar.MaterialToolbar
         android:id="@+id/toolbar"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:elevation="3dp"
-        android:background="@color/toolbar_background"
         app:theme="@style/LibreOfficeTheme.Toolbar"
         tools:theme="@style/LibreOfficeTheme.Toolbar"
         app:popupTheme="@style/LibreOfficeTheme"
@@ -30,7 +29,7 @@
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintTop_toTopOf="parent">
 
-    </androidx.appcompat.widget.Toolbar>
+    </com.google.android.material.appbar.MaterialToolbar>
 
 
     <androidx.drawerlayout.widget.DrawerLayout
diff --git a/android/source/res/layout/activity_main.xml b/android/source/res/layout/activity_main.xml
index cb43a43a3e1e..590a7de025b4 100644
--- a/android/source/res/layout/activity_main.xml
+++ b/android/source/res/layout/activity_main.xml
@@ -23,12 +23,11 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content">
 
-                <androidx.appcompat.widget.Toolbar
+                <com.google.android.material.appbar.MaterialToolbar
                     android:id="@+id/toolbar"
                     android:layout_width="match_parent"
                     android:layout_height="?attr/actionBarSize"
                     android:elevation="3dp"
-                    android:background="@color/toolbar_background"
                     app:theme="@style/LibreOfficeTheme.Toolbar"
                     tools:theme="@style/LibreOfficeTheme.Toolbar"
                     app:popupTheme="@style/LibreOfficeTheme" />
-- 
cgit