]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/view_source_coordinatorlayout.xml
Handle content:// URLs in View Source. https://redmine.stoutner.com/issues/361
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / view_source_coordinatorlayout.xml
index 4a3cc64790f0d8dabbaa7f218d5ce8f9d9264548..5fd4566ce733ab8ed9f42d16f6821be389aff7a1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2017-2020 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2017-2021 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
@@ -23,7 +23,6 @@
     android:id="@+id/view_source_coordinatorlayout"
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    tools:context="com.stoutner.privacybrowser.activities.ViewSourceActivity"
     android:layout_height="match_parent"
     android:layout_width="match_parent"
     android:focusable="true"
         android:layout_width="match_parent"
         android:orientation="vertical" >
 
+        <!-- The app bar theme must be specified here because the activity uses a `NoActionBar` theme. -->
         <com.google.android.material.appbar.AppBarLayout
             android:layout_height="wrap_content"
             android:layout_width="match_parent"
-            android:background="?android:attr/colorBackground" >
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
 
             <!-- The frame layout allows the toolbar and the progress bar to occupy the same space. -->
             <FrameLayout
@@ -71,6 +72,7 @@
             android:layout_width="match_parent">
 
             <ScrollView
+                android:id="@+id/view_source_scrollview"
                 android:layout_height="wrap_content"
                 android:layout_width="match_parent" >
 
 
                     <!-- Request headers. -->
                     <TextView
+                        android:id="@+id/request_headers_title_textview"
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
                         android:text="@string/request_headers"
                         android:textAlignment="center"
                         android:textSize="18sp"
-                        android:textColor="@color/blue_600"
+                        android:textColor="?attr/blueTextColor"
                         android:textStyle="bold" />
 
                     <TextView
-                        android:id="@+id/request_headers"
+                        android:id="@+id/request_headers_textview"
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
                         android:textIsSelectable="true"
 
                     <!-- Response message. -->
                     <TextView
+                        android:id="@+id/response_message_title_textview"
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
                         android:text="@string/response_message"
                         android:textAlignment="center"
                         android:textSize="18sp"
-                        android:textColor="@color/blue_600"
+                        android:textColor="?attr/blueTextColor"
                         android:textStyle="bold" />
 
                     <TextView
-                        android:id="@+id/response_message"
+                        android:id="@+id/response_message_textview"
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
                         android:textIsSelectable="true"
                         android:layout_marginBottom="8dp" />
 
                     <!-- Response headers. -->
+                    <!-- The title text is set programatically. -->
                     <TextView
+                        android:id="@+id/response_headers_title_textivew"
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
-                        android:text="@string/response_headers"
                         android:textAlignment="center"
                         android:textSize="18sp"
-                        android:textColor="@color/blue_600"
+                        android:textColor="?attr/blueTextColor"
                         android:textStyle="bold" />
 
                     <TextView
-                        android:id="@+id/response_headers"
+                        android:id="@+id/response_headers_textview"
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
                         android:textIsSelectable="true"
                         android:layout_marginBottom="8dp" />
 
                     <!-- Response body. -->
+                    <!-- The title text is set programatically. -->
                     <TextView
+                        android:id="@+id/response_body_title_textview"
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
-                        android:text="@string/response_body"
                         android:textAlignment="center"
                         android:textSize="18sp"
-                        android:textColor="@color/blue_600"
+                        android:textColor="?attr/blueTextColor"
                         android:textStyle="bold" />
 
                     <TextView
-                        android:id="@+id/response_body"
+                        android:id="@+id/response_body_textview"
                         android:layout_height="wrap_content"
                         android:layout_width="match_parent"
                         android:textIsSelectable="true" />