]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/webview_framelayout.xml
Combine drawable files. https://redmine.stoutner.com/issues/794
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / webview_framelayout.xml
index 0243a062ee2aea65ee3f356bd142cb8c3bdc15c5..42b4095436fb9c1bec5f405bc794615c0ac8387a 100644 (file)
@@ -1,38 +1,39 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2019 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2019-2020,2022 Soren Stoutner <soren@stoutner.com>.
 
-  This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>>.
+  This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
 
-  Privacy Browser is free software: you can redistribute it and/or modify
+  Privacy Browser Android 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,
+  Privacy Browser Android 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/>. -->
+  along with Privacy Browser Android.  If not, see <http://www.gnu.org/licenses/>. -->
 
 <!-- The frame layout allows the progress bar to float above the WebView. -->
 <FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="?attr/webViewBackground" >
+    android:layout_height="match_parent" >
 
-    <!-- The WebView is initially `visibility="invisible"` so that the background color matches the theme. -->
+    <!-- The nested scroll WebView is created with `visibility="invisible"` to prevent a white background splash in night mode because there is a delay in setting the background color.
+        It is set visible in `initializeWebView()` or `onProgressChanged()` in `MainWebViewActivity`. -->
     <com.stoutner.privacybrowser.views.NestedScrollWebView
         android:id="@+id/nestedscroll_webview"
         android:layout_height="match_parent"
         android:layout_width="match_parent"
         android:focusable="true"
         android:focusableInTouchMode="true"
+        android:background="?android:attr/colorBackground"
         android:visibility="invisible" />
 
     <!-- `android:max` changes the maximum `ProgressBar` value from 10000 to 100 to match progress percentage.