// Run the default commands.
super.onCreate(savedInstanceState);
- // Set the content view according to the theme.
- if (MainWebViewActivity.darkTheme) {
- setContentView(R.layout.about_coordinatorlayout_dark);
- } else {
- setContentView(R.layout.about_coordinatorlayout_light);
- }
+ // Set the content view.
+ setContentView(R.layout.about_coordinatorlayout);
// We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21.
Toolbar aboutAppBar = (Toolbar) findViewById(R.id.about_toolbar);
// Run the default commands.
super.onCreate(savedInstanceState);
- // Set the content view according to the theme.
- if (MainWebViewActivity.darkTheme) {
- setContentView(R.layout.guide_coordinatorlayout_dark);
- } else {
- setContentView(R.layout.guide_coordinatorlayout_light);
- }
+ // Set the content view.
+ setContentView(R.layout.guide_coordinatorlayout);
// We need to use `SupportActionBar` from `android.support.v7.app.ActionBar` until the minimum API is >= 21.
Toolbar guideAppBar = (Toolbar) findViewById(R.id.guide_toolbar);
// Run the default commands.
super.onCreate(savedInstanceState);
- // Set the content view according to the theme.
- if (darkTheme) {
- setContentView(R.layout.main_drawerlayout_dark);
- } else {
- setContentView(R.layout.main_drawerlayout_light);
- }
+ // Set the content view.
+ setContentView(R.layout.main_drawerlayout);
// Get a handle for `inputMethodManager`.
inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
}
// Set a transparent background on `urlTextBox`. We have to use the deprecated `.getDrawable()` until the minimum API >= 21.
- urlAppBarRelativeLayout.setBackgroundDrawable(getResources().getDrawable(R.drawable.url_bar_background_transparent));
+ urlAppBarRelativeLayout.setBackgroundDrawable(getResources().getDrawable(R.color.transparent));
}
// Close `domainsDatabaseHelper`.
// Load the tabs. Tab numbers start at 0.
if (tabNumber == 0) { // Load the about tab.
- // Inflate the layout according to the theme. Setting false at the end of inflater.inflate does not attach the inflated layout as a child of container. The fragment will take care of attaching the root automatically.
- if (MainWebViewActivity.darkTheme) {
- tabLayout = inflater.inflate(R.layout.about_tab_version_dark, container, false);
- } else {
- tabLayout = inflater.inflate(R.layout.about_tab_version_light, container, false);
- }
+ // Setting false at the end of inflater.inflate does not attach the inflated layout as a child of container. The fragment will take care of attaching the root automatically.
+ tabLayout = inflater.inflate(R.layout.about_tab_version, container, false);
// Get handles for the `TextViews`.
TextView versionNumberTextView = (TextView) tabLayout.findViewById(R.id.about_version_number);
package com.stoutner.privacybrowser.fragments;
import android.annotation.SuppressLint;
+import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
} else {
darkThemePreference.setIcon(R.drawable.theme_light);
}
+
+ // Create an `Intent` to restart Privacy Browser.
+ Intent intent = getActivity().getParentActivityIntent();
+
+ // Assert that `intent` is not `null` to remove the lint error below.
+ assert intent != null;
+
+ // `Intent.FLAG_ACTIVITY_CLEAR_TASK` removes all activities from the stack. It requires `Intent.FLAG_ACTIVITY_NEW_TASK`.
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
+
+ // Make it so.
+ startActivity(intent);
break;
case "display_webpage_images":
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<shape
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle" >
-
- <solid
- android:color="@color/transparent" />
-
- <corners
- android:radius="10dp" />
-</shape>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- 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
+ android:id="@+id/about_coordinatorlayout"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:fitsSystemWindows="true" >
+
+ <!-- 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="?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/about_appbarlayout"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:background="?attr/colorPrimaryDark" >
+
+ <!-- `android:theme="?attr/appBarTextTheme"` sets the color of the text and icons in the `AppBar`. -->
+ <android.support.v7.widget.Toolbar
+ android:id="@+id/about_toolbar"
+ android:layout_height="wrap_content"
+ 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/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: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.support.v4.view.ViewPager
+ android:id="@+id/about_viewpager"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+ </LinearLayout>
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- 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
- android:id="@+id/about_coordinatorlayout"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:fitsSystemWindows="true" >
-
- <!-- 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="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be black. -->
- <android.support.design.widget.AppBarLayout
- android:id="@+id/about_appbarlayout"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:background="?attr/colorPrimaryDark" >
-
- <!-- `android:theme="@style/PrivacyBrowserAppBarDark"` makes the text and icons in the `AppBar` gray. -->
- <android.support.v7.widget.Toolbar
- android:id="@+id/about_toolbar"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:background="?attr/colorPrimaryDark"
- android:theme="@style/PrivacyBrowserAppBarDark" />
-
- <!-- 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:tabMode="scrollable"
- android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
- android:theme="@style/PrivacyBrowserTabLayoutDark" />
- </android.support.design.widget.AppBarLayout>
-
- <!-- `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"
- android:layout_height="0dp"
- android:layout_weight="1" />
- </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- 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
- android:id="@+id/about_coordinatorlayout"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:fitsSystemWindows="true" >
-
- <!-- 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="?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:background="?attr/colorPrimaryDark" >
-
- <!-- `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:layout_width="match_parent"
- 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: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.support.v4.view.ViewPager
- android:id="@+id/about_viewpager"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" />
- </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- The `ScrollView` allows the `LinearLayout` to scroll if it exceeds the height of the page. -->
+<ScrollView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent" >
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:orientation="vertical"
+ android:padding="16dp" >
+
+ <!-- The `RelativeLayout` contains the header. -->
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" >
+
+ <!-- `tools:ignore="ContentDescription"` suppresses the lint warning about supplying a content description for the `ImageView`,
+ which isn't needed in this case because the `ImageView` is only decorative. -->
+ <ImageView
+ android:id="@+id/about_version_icon"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:src="@mipmap/privacy_browser"
+ android:paddingTop="10dp"
+ tools:ignore="ContentDescription" />
+
+ <TextView
+ android:id="@+id/about_version_privacy_browser_textview"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/privacy_browser"
+ android:textStyle="bold"
+ android:textSize="22sp"
+ android:textColor="?attr/aboutTitle"
+ android:layout_toEndOf="@id/about_version_icon" />
+
+ <TextView
+ android:id="@+id/about_version_number"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:textColor="?attr/aboutText"
+ android:layout_below="@id/about_version_privacy_browser_textview"
+ android:layout_toEndOf="@id/about_version_icon" />
+ </RelativeLayout>
+
+ <!-- The purpose of this `LinearLayout` is to provide padding on the start of the `TextViews` to make them line up with `about_version_icon`.
+ Although we don't need it, we have to include `android:paddingEnd` to make lint happy. -->
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:orientation="vertical"
+ android:paddingTop="16dp"
+ android:paddingStart="4dp"
+ android:paddingEnd="0dp" >
+
+ <!-- Hardware. -->
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/hardware"
+ android:textStyle="bold"
+ android:textSize="18sp"
+ android:textColor="?attr/aboutTitle" />
+
+ <TextView
+ android:id="@+id/about_version_brand"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_manufacturer"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_model"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_device"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_bootloader"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_radio"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <!-- Software. -->
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/software"
+ android:textStyle="bold"
+ android:textSize="18sp"
+ android:textColor="?attr/aboutTitle"
+ android:paddingTop="12dp" />
+
+ <TextView
+ android:id="@+id/about_version_android"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_build"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_securitypatch"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_webkit"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_chrome"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_orbot"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <!-- Package Signature. -->
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/package_signature"
+ android:textStyle="bold"
+ android:textSize="18sp"
+ android:textColor="?attr/aboutTitle"
+ android:paddingTop="12dp" />
+
+ <TextView
+ android:id="@+id/about_version_certificate_issuer_dn"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_certificate_subject_dn"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_certificate_start_date"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_certificate_end_date"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_certificate_version"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_certificate_serial_number"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+
+ <TextView
+ android:id="@+id/about_version_certificate_signature_algorithm"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content" />
+ </LinearLayout>
+ </LinearLayout>
+</ScrollView>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- The `ScrollView` allows the `LinearLayout` to scroll if it exceeds the height of the page. -->
-<ScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_height="wrap_content"
- android:layout_width="match_parent" >
-
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:padding="16dp" >
-
- <!-- The `RelativeLayout` contains the header. -->
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
-
- <!--`tools:ignore="ContentDescription"` suppresses the lint warning about supplying a content description for the `ImageView`,
- which isn't needed in this case because the `ImageView` is only decorative. -->
- <ImageView
- android:id="@+id/about_version_icon"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:src="@mipmap/privacy_browser"
- android:paddingTop="10dp"
- tools:ignore="ContentDescription" />
-
- <TextView
- android:id="@+id/about_version_privacy_browser_textview"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/privacy_browser"
- android:textStyle="bold"
- android:textSize="22sp"
- android:textColor="@color/blue_700"
- android:layout_toEndOf="@id/about_version_icon" />
-
- <TextView
- android:id="@+id/about_version_number"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/blue_400"
- android:layout_below="@id/about_version_privacy_browser_textview"
- android:layout_toEndOf="@id/about_version_icon" />
- </RelativeLayout>
-
- <!-- The purpose of this `LinearLayout` is to provide padding on the start of the `TextViews` to make them line up with `about_version_icon`.
- Although we don't need it, we have to include `android:paddingEnd` to make lint happy. -->
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:paddingTop="16dp"
- android:paddingStart="4dp"
- android:paddingEnd="0dp" >
-
- <!-- Hardware. -->
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/hardware"
- android:textStyle="bold"
- android:textSize="18sp"
- android:textColor="@color/blue_700" />
-
- <TextView
- android:id="@+id/about_version_brand"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_manufacturer"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_model"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_device"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_bootloader"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_radio"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <!-- Software. -->
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/software"
- android:textStyle="bold"
- android:textSize="18sp"
- android:textColor="@color/blue_700"
- android:paddingTop="12dp" />
-
- <TextView
- android:id="@+id/about_version_android"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_build"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_securitypatch"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_webkit"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_chrome"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_orbot"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <!-- Package Signature. -->
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/package_signature"
- android:textStyle="bold"
- android:textSize="18sp"
- android:textColor="@color/blue_700"
- android:paddingTop="12dp" />
-
- <TextView
- android:id="@+id/about_version_certificate_issuer_dn"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_subject_dn"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_start_date"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_end_date"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_version"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_serial_number"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_signature_algorithm"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
- </LinearLayout>
- </LinearLayout>
-</ScrollView>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- The `ScrollView` allows the `LinearLayout` to scroll if it exceeds the height of the page. -->
-<ScrollView
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_height="wrap_content"
- android:layout_width="match_parent" >
-
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:padding="16dp" >
-
- <!-- The `RelativeLayout` contains the header. -->
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content" >
-
- <!--`tools:ignore="ContentDescription"` suppresses the lint warning about supplying a content description for the `ImageView`,
- which isn't needed in this case because the `ImageView` is only decorative. -->
- <ImageView
- android:id="@+id/about_version_icon"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:src="@mipmap/privacy_browser"
- android:paddingTop="10dp"
- tools:ignore="ContentDescription" />
-
- <TextView
- android:id="@+id/about_version_privacy_browser_textview"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/privacy_browser"
- android:textStyle="bold"
- android:textSize="22sp"
- android:textColor="@color/blue_900"
- android:layout_toEndOf="@id/about_version_icon" />
-
- <TextView
- android:id="@+id/about_version_number"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:textColor="@color/blue_700"
- android:layout_below="@id/about_version_privacy_browser_textview"
- android:layout_toEndOf="@id/about_version_icon" />
- </RelativeLayout>
-
- <!-- The purpose of this `LinearLayout` is to provide padding on the start of the `TextViews` to make them line up with `about_version_icon`.
- Although we don't need it, we have to include `android:paddingEnd` to make lint happy. -->
- <LinearLayout
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:orientation="vertical"
- android:paddingTop="16dp"
- android:paddingStart="4dp"
- android:paddingEnd="0dp" >
-
- <!-- Hardware. -->
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/hardware"
- android:textStyle="bold"
- android:textSize="18sp"
- android:textColor="@color/blue_900" />
-
- <TextView
- android:id="@+id/about_version_brand"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_manufacturer"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_model"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_device"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_bootloader"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_radio"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <!-- Software. -->
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/software"
- android:textStyle="bold"
- android:textSize="18sp"
- android:textColor="@color/blue_900"
- android:paddingTop="12dp" />
-
- <TextView
- android:id="@+id/about_version_android"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_build"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_securitypatch"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_webkit"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_chrome"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_orbot"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <!-- Package Signature. -->
- <TextView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/package_signature"
- android:textStyle="bold"
- android:textSize="18sp"
- android:textColor="@color/blue_900"
- android:paddingTop="12dp" />
-
- <TextView
- android:id="@+id/about_version_certificate_issuer_dn"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_subject_dn"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_start_date"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_end_date"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_version"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_serial_number"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
-
- <TextView
- android:id="@+id/about_version_certificate_signature_algorithm"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
- </LinearLayout>
- </LinearLayout>
-</ScrollView>
\ No newline at end of file
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_gravity="center_vertical"
+ android:tint="?attr/findOnPageIconTintColor"
android:contentDescription="@string/previous"
- android:onClick="findPreviousOnPage"/>
+ android:onClick="findPreviousOnPage" />
<ImageView
android:id="@+id/find_next"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_gravity="center_vertical"
+ android:tint="?attr/findOnPageIconTintColor"
android:contentDescription="@string/next"
- android:onClick="findNextOnPage"/>
+ android:onClick="findNextOnPage" />
<ImageView
android:id="@+id/close_find"
android:layout_marginStart="4dp"
android:layout_marginEnd="8dp"
android:layout_gravity="center_vertical"
+ android:tint="?attr/findOnPageIconTintColor"
android:contentDescription="@string/close"
android:onClick="closeFindOnPage" />
</LinearLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<!-- 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
+ android:id="@+id/guide_coordinatorlayout"
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:fitsSystemWindows="true" >
+
+ <!-- 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="?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="?attr/colorPrimaryDark" >
+
+ <!-- `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_height="wrap_content"
+ 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: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.support.v4.view.ViewPager
+ android:id="@+id/guide_viewpager"
+ android:layout_width="match_parent"
+ android:layout_height="0dp"
+ android:layout_weight="1" />
+ </LinearLayout>
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- 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
- android:id="@+id/guide_coordinatorlayout"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:fitsSystemWindows="true" >
-
- <!-- 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="?attr/colorPrimaryDark"` here or any space to the right of the `TabLayout` on large devices will be black. -->
- <android.support.design.widget.AppBarLayout
- android:id="@+id/guide_appbarlayout"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:background="?attr/colorPrimaryDark" >
-
- <!-- `android:theme="@style/PrivacyBrowserAppBarDark"` makes the text and icons in the `AppBar` gray. -->
- <android.support.v7.widget.Toolbar
- android:id="@+id/guide_toolbar"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:background="?attr/colorPrimaryDark"
- android:theme="@style/PrivacyBrowserAppBarDark" />
-
- <!-- 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:tabMode="scrollable"
- android.support.design:tabIndicatorColor="?attr/tabIndicatorColor"
- android:theme="@style/PrivacyBrowserTabLayoutDark" />
- </android.support.design.widget.AppBarLayout>
-
- <!-- `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"
- android:layout_height="0dp"
- android:layout_weight="1" />
- </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<!-- 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
- android:id="@+id/guide_coordinatorlayout"
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:fitsSystemWindows="true" >
-
- <!-- 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="?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/guide_appbarlayout"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:background="?attr/colorPrimaryDark" >
-
- <!-- `android:theme="@style/PrivacyBrowserAppBarWhiteText"` makes the text and icons in the `AppBar` white. -->
- <android.support.v7.widget.Toolbar
- android:id="@+id/guide_toolbar"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- 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/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: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.support.v4.view.ViewPager
- android:id="@+id/guide_viewpager"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- android:layout_weight="1" />
- </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright © 2015-2017 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<android.support.v4.widget.DrawerLayout
+ android:id="@+id/drawerlayout"
+ 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"` moves `root_coordinatorlayout` below the system status bar.
+ When it is specified, the theme should include `<item name="android:windowTranslucentStatus">true</item>`.
+ Setting the layout root to be `focusableInTouchMode` prevents `urlTextBox` from stealing focus on launch and opening the keyboard. -->
+ <android.support.design.widget.CoordinatorLayout
+ android:id="@+id/root_coordinatorlayout"
+ xmlns:tools="http://schemas.android.com/tools"
+ tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:fitsSystemWindows="true"
+ android:focusable="true"
+ android:focusableInTouchMode="true" >
+
+ <!-- The purpose of the `LinearLayout` is to place the included `main_webview` below `app_bar_layout`. -->
+ <LinearLayout
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:orientation="vertical" >
+
+ <!-- The `AppBarLayout` theme has to be defined here because the activity uses a `NoActionBar` theme. -->
+ <android.support.design.widget.AppBarLayout
+ android:id="@+id/app_bar_layout"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:theme="@style/PrivacyBrowserAppBarLight" >
+
+ <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
+ <FrameLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent" >
+
+ <android.support.v7.widget.Toolbar
+ android:id="@+id/app_bar"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent" />
+
+ <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
+ `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
+ `tools:ignore="UnusedAttribute"` removes the lint waring about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
+ <ProgressBar
+ android:id="@+id/progress_bar"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="3dp"
+ android:layout_gravity="bottom"
+ android:max="100"
+ android:progressTint="?attr/progressTintColor"
+ android:progressBackgroundTint="@color/transparent"
+ android:visibility="gone"
+ tools:ignore="UnusedAttribute" />
+
+ <include layout="@layout/find_on_page_app_bar" />
+ </FrameLayout>
+ </android.support.design.widget.AppBarLayout>
+
+ <include layout="@layout/main_webview" />
+ </LinearLayout>
+
+ <!-- `full_screen_video_framelayout` is used to display full screen videos. It is initially `android:visibility="gone"` to hide it from view. -->
+ <FrameLayout
+ android:id="@+id/full_screen_video_framelayout"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:visibility="gone"
+ android:background="@color/black" />
+ </android.support.design.widget.CoordinatorLayout>
+
+ <!-- The navigation drawer. -->
+ <android.support.design.widget.NavigationView
+ android:id="@+id/navigationview"
+ android:layout_height="match_parent"
+ android:layout_width="wrap_content"
+ android:layout_gravity="start"
+ app:headerLayout="@layout/navigation_header"
+ app:menu="@menu/webview_navigation_menu"
+ app:itemIconTint="?attr/navigationIconTintColor" />
+</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2015-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<android.support.v4.widget.DrawerLayout
- android:id="@+id/drawerlayout"
- 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" moves rootCoordinatorLayout below the system status bar.
- When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>.
- Setting the layout root to be focusableInTouchMode prevents urlTextBox from stealing focus on launch and opening the keyboard. -->
- <android.support.design.widget.CoordinatorLayout
- android:id="@+id/root_coordinatorlayout"
- xmlns:tools="http://schemas.android.com/tools"
- tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:fitsSystemWindows="true"
- android:focusable="true"
- android:focusableInTouchMode="true" >
-
- <!-- The purpose of the LinearLayout is to place the included main_webview below appBarLayout. -->
- <LinearLayout
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical" >
-
- <android.support.design.widget.AppBarLayout
- android:id="@+id/app_bar_layout"
- android:layout_height="wrap_content"
- android:layout_width="match_parent" >
-
- <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
- <FrameLayout
- android:layout_height="wrap_content"
- android:layout_width="match_parent" >
-
- <android.support.v7.widget.Toolbar
- android:id="@+id/app_bar"
- android:layout_height="wrap_content"
- android:layout_width="match_parent" />
-
- <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
- `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
- `tools:ignore="UnusedAttribute"` removes the lint waring about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
- <ProgressBar
- android:id="@+id/progress_bar"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="fill_parent"
- android:layout_height="3dp"
- android:layout_gravity="bottom"
- android:max="100"
- android:progressTint="@color/blue_900"
- android:progressBackgroundTint="@color/transparent"
- android:visibility="gone"
- tools:ignore="UnusedAttribute" />
-
- <include layout="@layout/find_on_page_app_bar" />
- </FrameLayout>
- </android.support.design.widget.AppBarLayout>
-
- <include layout="@layout/main_webview" />
- </LinearLayout>
-
- <!-- `full_screen_video_framelayout` is used to display full screen videos. It is initially `android:visibility="gone"` to hide it from view. -->
- <FrameLayout
- android:id="@+id/full_screen_video_framelayout"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:visibility="gone"
- android:background="@color/black" />
- </android.support.design.widget.CoordinatorLayout>
-
- <!-- The navigation drawer. -->
- <android.support.design.widget.NavigationView
- android:id="@+id/navigationview"
- android:layout_height="match_parent"
- android:layout_width="wrap_content"
- android:layout_gravity="start"
- app:headerLayout="@layout/navigation_header_dark"
- app:menu="@menu/webview_navigation_menu"
- app:itemIconTint="@color/blue_900" />
-</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2015-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<android.support.v4.widget.DrawerLayout
- android:id="@+id/drawerlayout"
- 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" moves rootCoordinatorLayout below the system status bar.
- When it is specified the theme should include <item name="android:windowTranslucentStatus">true</item>.
- Setting the layout root to be focusableInTouchMode prevents urlTextBox from stealing focus on launch and opening the keyboard. -->
- <android.support.design.widget.CoordinatorLayout
- android:id="@+id/root_coordinatorlayout"
- xmlns:tools="http://schemas.android.com/tools"
- tools:context="com.stoutner.privacybrowser.activities.MainWebViewActivity"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:fitsSystemWindows="true"
- android:focusable="true"
- android:focusableInTouchMode="true" >
-
- <!-- The purpose of the LinearLayout is to place the included main_webview below appBarLayout. -->
- <LinearLayout
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:orientation="vertical" >
-
- <!-- The `AppBarLayout` theme has to be defined here because the activity uses a `NoActionBar` theme. -->
- <android.support.design.widget.AppBarLayout
- android:id="@+id/app_bar_layout"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:theme="@style/PrivacyBrowserAppBarLight" >
-
- <!-- The `FrameLayout` allows `appBar` and `find_on_page_app_bar` to occupy the same space. -->
- <FrameLayout
- android:layout_height="wrap_content"
- android:layout_width="match_parent" >
-
- <android.support.v7.widget.Toolbar
- android:id="@+id/app_bar"
- android:layout_height="wrap_content"
- android:layout_width="match_parent" />
-
- <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.
- `android:layout_height="2dp"` works best for API >= 23, but `3dp` is required for visibility on API <= 22.
- `tools:ignore="UnusedAttribute"` removes the lint waring about `progressTint` and `progressBackgroundTint` not applying to API < 21. -->
- <ProgressBar
- android:id="@+id/progress_bar"
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="fill_parent"
- android:layout_height="3dp"
- android:layout_gravity="bottom"
- android:max="100"
- android:progressTint="@color/blue_700"
- android:progressBackgroundTint="@color/transparent"
- android:visibility="gone"
- tools:ignore="UnusedAttribute" />
-
- <include layout="@layout/find_on_page_app_bar" />
- </FrameLayout>
- </android.support.design.widget.AppBarLayout>
-
- <include layout="@layout/main_webview" />
- </LinearLayout>
-
- <!-- `full_screen_video_framelayout` is used to display full screen videos. It is initially `android:visibility="gone"` to hide it from view. -->
- <FrameLayout
- android:id="@+id/full_screen_video_framelayout"
- android:layout_height="match_parent"
- android:layout_width="match_parent"
- android:visibility="gone"
- android:background="@color/black" />
- </android.support.design.widget.CoordinatorLayout>
-
- <!-- The navigation drawer. -->
- <android.support.design.widget.NavigationView
- android:id="@+id/navigationview"
- android:layout_height="match_parent"
- android:layout_width="wrap_content"
- android:layout_gravity="start"
- app:headerLayout="@layout/navigation_header_light"
- app:menu="@menu/webview_navigation_menu"
- app:itemIconTint="@color/blue_800" />
-</android.support.v4.widget.DrawerLayout>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<TextView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/navigationText"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/navigation"
+ android:paddingTop="35dp"
+ android:paddingBottom="8dp"
+ android:paddingStart="15dp"
+ android:paddingEnd="15dp"
+ android:textStyle="bold"
+ android:textSize="20sp"
+ android:background="?attr/navigationHeaderBackground"
+ android:textColor="?attr/navigationHeaderTextColor" />
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/navigationText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/navigation"
- android:paddingTop="35dp"
- android:paddingBottom="8dp"
- android:paddingStart="15dp"
- android:paddingEnd="15dp"
- android:textStyle="bold"
- android:textSize="20sp"
- android:background="@color/blue_900"
- android:textColor="@color/gray_300" />
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
-
- This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
-
- Privacy Browser is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
-
-<TextView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/navigationText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/navigation"
- android:paddingTop="35dp"
- android:paddingBottom="8dp"
- android:paddingStart="15dp"
- android:paddingEnd="15dp"
- android:textStyle="bold"
- android:textSize="20sp"
- android:background="@color/blue_700"
- android:textColor="@color/white" />
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
+
+ This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+
+ Privacy Browser is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>. -->
+
+<resources>
+ <attr name="appBarTheme" format="reference" />
+ <attr name="appBarTextTheme" format="reference" />
+ <attr name="tabLayoutTheme" format="reference" />
+
+ <attr name="aboutTitle" format="reference" />
+ <attr name="aboutText" format="reference" />
+
+ <attr name="navigationHeaderBackground" format="reference" />
+ <attr name="navigationHeaderTextColor" format="reference" />
+
+ <attr name="progressTintColor" format="reference" />
+ <attr name="navigationIconTintColor" format="reference" />
+
+ <attr name="findOnPageIconTintColor" format="reference" />
+</resources>
\ No newline at end of file
<string name="display_additional_app_bar_icons">Display additional app bar icons</string>
<string name="display_additional_app_bar_icons_summary">Display icons for toggling cookies, DOM storage, and form data in the app bar if there is room.</string>
<string name="dark_theme">Dark theme</string>
- <string name="dark_theme_summary">Privacy Browser must be restarted for the new theme to take effect.</string>
+ <string name="dark_theme_summary">Changing the theme will restart Privacy Browser.</string>
<string name="display_webpage_images">Display webpage images</string>
<string name="display_webpage_images_summary">Disable to conserve bandwidth.</string>
<!-- Light theme styles. -->
<!-- `android:windowTranslucentStatus` makes the system status bar translucent.
- When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
+ When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
<style name="PrivacyBrowserLight" parent="Theme.AppCompat.Light.NoActionBar" >
<item name="android:windowTranslucentStatus">true</item>
<item name="colorAccent">@color/blue_700</item>
<item name="android:textColorHighlight">@color/blue_200</item>
+ <item name="navigationHeaderBackground">@color/blue_700</item>
+ <item name="navigationHeaderTextColor">@color/white</item>
+ <item name="appBarTheme">@style/PrivacyBrowserAppBarLight</item>
+ <item name="progressTintColor">@color/blue_700</item>
+ <item name="navigationIconTintColor">@color/blue_800</item>
+ <item name="findOnPageIconTintColor">@color/blue_700</item>
</style>
- <!-- `colorPrimaryDark` goes behind the status bar, which is then darkened by the overlay.
- `windowActionModeOverlay` makes the contextual app bar cover the support app bar. -->
+ <!-- `windowActionModeOverlay` makes the contextual app bar cover the support app bar.
+ `colorPrimaryDark` goes behind the status bar, which is then darkened by the overlay.-->
<style name="PrivacyBrowserLight.SecondaryActivity" >
+ <item name="windowActionModeOverlay">true</item>
<item name="colorPrimaryDark">@color/blue_700</item>
<item name="android:textColorHighlight">@color/blue_200</item>
- <item name="windowActionModeOverlay">true</item>
<item name="android:actionModeBackground">@color/blue_700</item>
+ <item name="aboutTitle">@color/blue_900</item>
+ <item name="aboutText">@color/blue_700</item>
<item name="actionBarPopupTheme">@style/PrivacyBrowserPopupsLight</item>
+ <item name="appBarTextTheme">@style/PrivacyBrowserAppBarWhiteText</item>
+ <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutLight</item>
</style>
<!-- `colorPrimaryDark` is the color of the status bar. -->
<!-- Dark theme styles. -->
<!-- `android:windowTranslucentStatus` makes the system status bar translucent.
- When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
+ When it is specified the root layout should include `android:fitsSystemWindows="true"`. -->
<style name="PrivacyBrowserDark" parent="Theme.AppCompat.NoActionBar" >
<item name="android:windowTranslucentStatus">true</item>
<item name="android:textColorPrimary">@color/dark_primary_text_color_selector</item>
<item name="colorAccent">@color/blue_900</item>
<item name="android:textColorHighlight">@color/blue_800</item>
+ <item name="navigationHeaderBackground">@color/blue_900</item>
+ <item name="navigationHeaderTextColor">@color/gray_300</item>
+ <item name="appBarTheme">@style/PrivacyBrowserAppBarDark</item>
+ <item name="progressTintColor">@color/blue_800</item>
+ <item name="navigationIconTintColor">@color/blue_900</item>
+ <item name="findOnPageIconTintColor">@color/blue_900</item>
</style>
<style name="PrivacyBrowserDark.SecondaryActivity" >
<item name="colorPrimaryDark">@color/blue_900</item>
+ <item name="aboutTitle">@color/blue_700</item>
+ <item name="aboutText">@color/blue_400</item>
+ <item name="appBarTextTheme">@style/PrivacyBrowserAppBarDark</item>
+ <item name="tabLayoutTheme">@style/PrivacyBrowserTabLayoutDark</item>
</style>
<!-- `ThemeOverlay.AppCompat.Dark.ActionBar` makes the text and the icons in the AppBar white. -->