]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/about_coordinatorlayout.xml
Migrate to AndroidX from the Android Support Library. https://redmine.stoutner.com...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / about_coordinatorlayout.xml
index a0d221e6a7a7270e37ccdf34f298691e02da1c0b..4d844be1b95ec90d3d538160e11809353ff64b3e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2016-2017,2019 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
 <!-- android:fitsSystemWindows="true" moves the AppBar below the status bar.
   When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>
   to make the status bar a transparent, darkened overlay. -->
-<android.support.design.widget.CoordinatorLayout
+<androidx.coordinatorlayout.widget.CoordinatorLayout
     android:id="@+id/about_coordinatorlayout"
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_height="match_parent"
     android:layout_width="match_parent"
     android:fitsSystemWindows="true" >
 
-    <!-- the LinearLayout with orientation="vertical" moves the ViewPager below the AppBarLayout. -->
+    <!-- The `LinearLayout` with `orientation="vertical"` moves the `ViewPager` below the `AppBarLayout`. -->
     <LinearLayout
         android:layout_height="match_parent"
         android:layout_width="match_parent"
         android:orientation="vertical" >
 
-        <!-- We need to set android:background="@color/blue" here or any space to the right of the TabLayout on large devices will be white. -->
-        <android.support.design.widget.AppBarLayout
+        <!-- We need to set `android:background="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be the theme background color. -->
+        <com.google.android.material.appbar.AppBarLayout
             android:id="@+id/about_appbarlayout"
             android:layout_height="wrap_content"
             android:layout_width="match_parent"
-            android:background="@color/blue"
-            android:theme="@style/AppBarOverlay" >
+            android:background="?attr/colorPrimaryDark" >
 
-            <!-- android:theme="@style/PrivacyBrowser.DarkAppBar" makes the text and icons in the AppBar white. -->
-            <android.support.v7.widget.Toolbar
+            <!-- `android:theme="?attr/appBarTextTheme"` sets the color of the text and icons in the `AppBar`. -->
+            <androidx.appcompat.widget.Toolbar
                 android:id="@+id/about_toolbar"
                 android:layout_height="wrap_content"
                 android:layout_width="match_parent"
-                android:background="@color/blue"
-                android:theme="@style/DarkAppBar"
-                app:popupTheme="@style/LightPopupOverlay" />
+                android:background="?attr/colorPrimaryDark"
+                android:theme="?attr/appBarTextTheme" />
 
-            <android.support.design.widget.TabLayout
+            <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
+            <com.google.android.material.tabs.TabLayout
                 android:id="@+id/about_tablayout"
                 xmlns:android.support.design="http://schemas.android.com/apk/res-auto"
                 android:layout_height="wrap_content"
                 android:layout_width="match_parent"
-                android.support.design:tabBackground="@color/blue"
-                android.support.design:tabTextColor="@color/light_blue"
-                android.support.design:tabSelectedTextColor="@color/white"
-                android.support.design:tabIndicatorColor="@color/white"
-                android.support.design:tabMode="scrollable" />
-        </android.support.design.widget.AppBarLayout>
+                android.support.design:tabMode="scrollable"
+                android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
+                android:theme="?attr/tabLayoutTheme" />
+        </com.google.android.material.appbar.AppBarLayout>
 
-        <!-- android:layout_weight="1" makes about_viewpager fill the rest of the screen. -->
-        <android.support.v4.view.ViewPager
+        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
+        <androidx.viewpager.widget.ViewPager
             android:id="@+id/about_viewpager"
-            android:layout_width="match_parent"
             android:layout_height="0dp"
+            android:layout_width="match_parent"
             android:layout_weight="1" />
     </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
+</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file