]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/res/layout/import_export_coordinatorlayout.xml
Fix downloads consuming massive CPU and locking the UI on slower CPUs. https://redmin...
[PrivacyBrowserAndroid.git] / app / src / main / res / layout / import_export_coordinatorlayout.xml
index b6eebd1fc44a3db4622bc7c5806a8a8fd4d695ff..14ed65558c65a0906fa2826caa5a808a2c2f9e34 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2018-2020 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2018-2021 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
   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. -->
 <androidx.coordinatorlayout.widget.CoordinatorLayout
     android:id="@+id/import_export_coordinatorlayout"
     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" >
+    android:layout_width="match_parent" >
 
-    <!-- the `LinearLayout` with `orientation="vertical"` moves the content below the `AppBarLayout`. -->
+    <!-- the linear layout with `orientation="vertical"` moves the content below the app bar layout. -->
     <LinearLayout
         android:layout_height="match_parent"
         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:id="@+id/import_export_appbarlayout"
             android:layout_height="wrap_content"
-            android:layout_width="match_parent" >
+            android:layout_width="match_parent"
+            android:background="?android:attr/colorBackground"
+            android:theme="@style/PrivacyBrowserAppBar" >
 
             <androidx.appcompat.widget.Toolbar
                 android:id="@+id/import_export_toolbar"
                 android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:background="?attr/colorPrimaryDark"
-                android:theme="?attr/appBarTextTheme"
-                app:popupTheme="?attr/popupsTheme" />
+                android:layout_width="match_parent" />
         </com.google.android.material.appbar.AppBarLayout>
 
         <ScrollView
 
                         <!-- The encryption password. -->
                         <com.google.android.material.textfield.TextInputLayout
-                            android:id="@+id/password_encryption_textinputlayout"
+                            android:id="@+id/encryption_password_textinputlayout"
                             android:layout_height="wrap_content"
                             android:layout_width="match_parent"
                             app:passwordToggleEnabled="true" >
 
                             <com.google.android.material.textfield.TextInputEditText
-                                android:id="@+id/password_encryption_edittext"
+                                android:id="@+id/encryption_password_edittext"
                                 android:layout_height="wrap_content"
                                 android:layout_width="match_parent"
                                 android:hint="@string/password"
                             android:layout_gravity="center_horizontal"
                             android:layout_marginTop="10dp"
                             android:text="@string/kitkat_password_encryption_message"
-                            android:textColor="?android:textColorPrimary"
                             android:textAlignment="center" />
 
                         <!-- OpenKeychain required message. -->
                             android:layout_gravity="center_horizontal"
                             android:layout_marginTop="10dp"
                             android:text="@string/openkeychain_required"
-                            android:textColor="?android:textColorPrimary"
                             android:textAlignment="center" />
                     </LinearLayout>
                 </androidx.cardview.widget.CardView>
                                 android:onClick="browse" />
                         </LinearLayout>
 
-                        <!-- File notices. -->
-                        <TextView
-                            android:id="@+id/file_does_not_exist_textview"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_margin="5dp"
-                            android:text="@string/file_does_not_exist"
-                            android:textColor="?attr/redText"
-                            android:textAlignment="center" />
-
-                        <TextView
-                            android:id="@+id/file_exists_warning_textview"
-                            android:layout_height="wrap_content"
-                            android:layout_width="wrap_content"
-                            android:layout_gravity="center_horizontal"
-                            android:layout_margin="5dp"
-                            android:text="@string/file_exists_warning"
-                            android:textColor="?attr/redText"
-                            android:textAlignment="center" />
-
                         <!-- OpenKeychain import instructions -->
                         <TextView
                             android:id="@+id/openkeychain_import_instructions_textview"
                             android:layout_gravity="center_horizontal"
                             android:layout_margin="5dp"
                             android:text="@string/openkeychain_import_instructions"
-                            android:textColor="?android:textColorPrimary"
                             android:textAlignment="center" />
 
                         <Button
                             android:textColor="?attr/buttonTextColorSelector" />
                     </LinearLayout>
                 </androidx.cardview.widget.CardView>
-
-                <TextView
-                    android:id="@+id/import_export_storage_permission_textview"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center_horizontal"
-                    android:layout_marginBottom="10dp"
-                    android:layout_marginStart="15dp"
-                    android:layout_marginEnd="15dp"
-                    android:text="@string/storage_permission_explanation"
-                    android:textColor="?android:textColorPrimary"
-                    android:textAlignment="center" />
             </LinearLayout>
         </ScrollView>
     </LinearLayout>