<?xml version="1.0" encoding="utf-8"?>
<!--
- Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+ Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
<android.support.design.widget.CoordinatorLayout
android:id="@+id/guide_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_width="match_parent"
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 the theme background color. -->
<android.support.design.widget.AppBarLayout
android:id="@+id/guide_appbarlayout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:background="@color/blue_700"
- android:theme="@style/AppBarOverlay" >
+ android:background="?attr/colorPrimaryDark" >
- <!-- android:theme="@style/PrivacyBrowser.DarkAppBar" makes the text and icons in the AppBar white. -->
+ <!-- `android:theme="?attr/appBarTextTheme"` sets the color of the text and icons in the `AppBar`. -->
<android.support.v7.widget.Toolbar
android:id="@+id/guide_toolbar"
- android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@color/blue_700"
- android:theme="@style/DarkAppBar"
- app:popupTheme="@style/LightPopupOverlay" />
+ android:layout_width="match_parent"
+ android:background="?attr/colorPrimaryDark"
+ android:theme="?attr/appBarTextTheme" />
+ <!-- For some reason `tabIndicatorColor` does not pull from the style unless specified explicitly here. -->
<android.support.design.widget.TabLayout
android:id="@+id/guide_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_700"
- 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="?attr/tabLayoutTheme" />
</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/guide_viewpager"
android:layout_width="match_parent"