]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/about_coordinatorlayout_light.xml
Create a dark theme for `GuideActivity`.
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / about_coordinatorlayout_light.xml
index ce665c15f77fe2ae1a5933b9b93e15b2bf926b6c..0038ed16f16ec7993edc125508d1787c6cd9f36d 100644 (file)
     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_700" here or any space to the right of the TabLayout on large devices will be white. -->
+        <!-- We need to set `android:background="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be white. -->
         <android.support.design.widget.AppBarLayout
             android:id="@+id/about_appbarlayout"
             android:layout_height="wrap_content"
-            android:layout_width="match_parent" >
+            android:layout_width="match_parent"
+            android:background="?attr/colorPrimaryDark" >
 
-            <!-- android:theme="@style/PrivacyBrowser.AppBarDark" makes the text and icons in the AppBar white. -->
+            <!-- `android:theme="@style/PrivacyBrowserAppBarWhiteText"` makes the text and icons in the `AppBar` white. -->
             <android.support.v7.widget.Toolbar
                 android:id="@+id/about_toolbar"
                 android:layout_height="wrap_content"
                 android:background="?attr/colorPrimaryDark"
                 android:theme="@style/PrivacyBrowserAppBarWhiteText" />
 
+            <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
             <android.support.design.widget.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="?attr/colorPrimaryDark"
-                android.support.design:tabTextColor="@color/blue_100"
-                android.support.design:tabSelectedTextColor="@color/white"
-                android.support.design:tabIndicatorColor="@color/white"
-                android.support.design:tabMode="scrollable" />
+                android.support.design:tabMode="scrollable"
+                android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
+                android:theme="@style/PrivacyBrowserTabLayoutLight" />
         </android.support.design.widget.AppBarLayout>
 
-        <!-- android:layout_weight="1" makes about_viewpager fill the rest of the screen. -->
+        <!-- `android:layout_weight="1"` makes `about_viewpager` fill the rest of the screen. -->
         <android.support.v4.view.ViewPager
             android:id="@+id/about_viewpager"
             android:layout_width="match_parent"