]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/about_tab_version.xml
Refactor style code to use attrs.xml. Create a dark theme for Find on Page.
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / about_tab_version.xml
diff --git a/app/src/main/res/layout/about_tab_version.xml b/app/src/main/res/layout/about_tab_version.xml
new file mode 100644 (file)
index 0000000..19922b2
--- /dev/null
@@ -0,0 +1,203 @@
+<?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