]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/view_source_coordinatorlayout.xml
Fix problems with audio still playing after a tab is closed. https://redmine.stoutne...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / view_source_coordinatorlayout.xml
index 3c3a07690e14e33508f1b37f3d0df009c5be960b..f8c1c8b6b01d53b4dd1d1ce03fca03b39d0c735e 100644 (file)
   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.
-    Setting the layout root to be `focusableInTouchMode` prevents the URL toolbar from stealing focus on launch and opening the keyboard. -->
+<!-- Setting the layout root to be `focusableInTouchMode` prevents the URL toolbar from stealing focus on launch and opening the keyboard. -->
 <androidx.coordinatorlayout.widget.CoordinatorLayout
     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:fitsSystemWindows="true"
     android:focusable="true"
     android:focusableInTouchMode="true" >
 
         android:layout_width="match_parent"
         android:orientation="vertical" >
 
-        <!-- The app bar layout theme may not need to be specified here.  But more testing on all APIs needs to be done before it can be removed. -->
+        <!-- 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:theme="@style/PrivacyBrowserAppBarLight" >
+            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
@@ -74,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" >
 
@@ -90,7 +89,7 @@
                         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:text="@string/response_message"
                         android:textAlignment="center"
                         android:textSize="18sp"
-                        android:textColor="@color/blue_600"
+                        android:textColor="?attr/blueTextColor"
                         android:textStyle="bold" />
 
                     <TextView
                         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:text="@string/response_body"
                         android:textAlignment="center"
                         android:textSize="18sp"
-                        android:textColor="@color/blue_600"
+                        android:textColor="?attr/blueTextColor"
                         android:textStyle="bold" />
 
                     <TextView