]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Fix bookmarks drawer layout on API <= 29. https://redmine.stoutner.com/issues/1257
authorSoren Stoutner <soren@stoutner.com>
Mon, 6 Jan 2025 20:09:14 +0000 (13:09 -0700)
committerSoren Stoutner <soren@stoutner.com>
Mon, 6 Jan 2025 20:09:14 +0000 (13:09 -0700)
app/src/main/assets/de/about_changelog.html
app/src/main/assets/en/about_changelog.html
app/src/main/assets/es/about_changelog.html
app/src/main/assets/fr/about_changelog.html
app/src/main/assets/it/about_changelog.html
app/src/main/assets/pt-rBR/about_changelog.html
app/src/main/assets/ru/about_changelog.html
app/src/main/assets/tr/about_changelog.html
app/src/main/assets/zh-rCN/about_changelog.html
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.kt
app/src/main/res/layout/bookmarks_drawer_top_appbar.xml

index ea62673dacdd98e7226f2e6f9695076c65612856..f564d776b3650c1cd0506a862fac79a91c605eee 100644 (file)
@@ -34,7 +34,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (Code-Version 77)</h3>
-        <p>2. Januar 2025 - Mindest-API 26, Ziel-API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2. Januar 2025</a> - Mindest-API 26, Ziel-API 35</p>
         <ul>
             <li>Problem beim Öffnen <a href="https://redmine.stoutner.com/issues/1254">von "Über" oder "Import/Export"</a> behoben, wenn Drittanbieter-Apps nicht installiert sind.</li>
         </ul>
index 52c2ae97e4148815cfc081634fc5f3f2b6467a40..dff9085e05550ae335f3eebde5e57c298c177cf0 100644 (file)
@@ -30,7 +30,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (version code 77)</h3>
-        <p>2 January 2025 - minimum API 26, target API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2 January 2025</a> - minimum API 26, target API 35</p>
         <ul>
             <li>Fix a crash when opening <a href="https://redmine.stoutner.com/issues/1254">About or Import/Export</a> when third-party apps are not installed.</li>
         </ul>
index 92e7d7d71d54997defc7bcc3a95b20f7875d7fa6..b3b773370ebf3fc065b0c11191aff7381b71039a 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (código de versión 77)</h3>
-        <p>2 de enero de 2025 - API mínimo 26, API objetivo 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2 de enero de 2025</a> - API mínimo 26, API objetivo 35</p>
         <ul>
             <li>Corregir una caída al abrir <a href="https://redmine.stoutner.com/issues/1254">Acerca De o Importar/Exportar</a> cuando no están instaladas aplicaciones de terceros.</li>
         </ul>
index eb0641bd86767369c92fbd1941874e12e125b2a5..ec6346f261a27871b297d7ca2c6aa87033bc7a42 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (version du code 77)</h3>
-        <p>2 Janvier 2025 - API minimale : 26, API optimale : 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2 Janvier 2025</a> - API minimale : 26, API optimale : 35</p>
         <ul>
             <li>Fix a crash when opening <a href="https://redmine.stoutner.com/issues/1254">About or Import/Export</a> when third-party apps are not installed.</li>
         </ul>
index f4858ac048e022118835646bb1a797a4810cd8be..ab33746549d866bfbe2029e7a1921f848d59fdfc 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (versione codice 77)</h3>
-        <p>2 Gennaio 2025 - minima API 26, target API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2 Gennaio 2025</a> - minima API 26, target API 35</p>
         <ul>
             <li>Fix a crash when opening <a href="https://redmine.stoutner.com/issues/1254">About or Import/Export</a> when third-party apps are not installed.</li>
         </ul>
index b1b4c774602155ada39dec28ce2cf534187f4fa0..54d61fd9355d46f8991a58d7bf54ca993588e97d 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (código de versão 77)</h3>
-        <p>2 de janeiro de 2025 - minimum API 26, target API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2 de janeiro de 2025</a> - minimum API 26, target API 35</p>
         <ul>
             <li>Fix a crash when opening <a href="https://redmine.stoutner.com/issues/1254">About or Import/Export</a> when third-party apps are not installed.</li>
         </ul>
index c78c70b68a0c033cd1ca6071f6e9b16069c964a3..f198f674126e40a6c8c8e32d776c5ec095ad67b5 100644 (file)
@@ -30,7 +30,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (код версии 77)</h3>
-        <p>2 января 2025 года - минимальный API 26, целевой API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2 января 2025 года</a> - минимальный API 26, целевой API 35</p>
         <ul>
             <li>Устранен сбой, возникавший при открытии разделов <a href="https://redmine.stoutner.com/issues/1254">О Privacy Browser или Импорт/Экспорт</a>, если не установлены приложения сторонних разработчиков.</li>
         </ul>
index 8a3abf262891962d92d8f6970867ec49fef239e3..aadfea6126c1adc645a2db863ae4e9a5538e0f40 100644 (file)
@@ -30,7 +30,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (version code 77)</h3>
-        <p>2 Ocak 2025 - minimum API 26, target API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2 Ocak 2025</a> - minimum API 26, target API 35</p>
         <ul>
             <li>Fix a crash when opening <a href="https://redmine.stoutner.com/issues/1254">About or Import/Export</a> when third-party apps are not installed.</li>
         </ul>
index d74223a2a23bbe2266403c08faf51ed4b636bde9..7b0fe6bba4380b5cd51e615c647f8ebb6b5849bd 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-1">3.19.1</a> (version code 77)</h3>
-        <p>2 January 2025 - 最低支持API 26, 最高支持API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=023f59dfaeefe5d1d6c12c5af92dbfcaf0fef3cc;ds=sidebyside">2 January 2025</a> - 最低支持API 26, 最高支持API 35</p>
         <ul>
             <li>Fix a crash when opening <a href="https://redmine.stoutner.com/issues/1254">About or Import/Export</a> when third-party apps are not installed.</li>
         </ul>
index c57fce1681fed3fb044fe91270aa2e2322aa1a50..230d5081ab0fc90baae4166959f73103d509301f 100644 (file)
@@ -1,5 +1,5 @@
 /* SPDX-License-Identifier: GPL-3.0-or-later
- * SPDX-FileCopyrightText: 2015-2024 Soren Stoutner <soren@stoutner.com>
+ * SPDX-FileCopyrightText: 2015-2025 Soren Stoutner <soren@stoutner.com>
  *
  * Download cookie code contributed 2017 Hendrik Knackstedt.  Copyright assigned to Soren Stoutner <soren@stoutner.com>.
  *
@@ -69,8 +69,8 @@ import android.view.WindowManager
 import android.view.inputmethod.InputMethodManager
 import android.webkit.CookieManager
 import android.webkit.HttpAuthHandler
-import android.webkit.ValueCallback
 import android.webkit.SslErrorHandler
+import android.webkit.ValueCallback
 import android.webkit.WebChromeClient
 import android.webkit.WebResourceRequest
 import android.webkit.WebResourceResponse
@@ -259,9 +259,10 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
     private lateinit var appBar: ActionBar
     private lateinit var checkFilterListHelper: CheckFilterListHelper
     private lateinit var bookmarksCursorAdapter: CursorAdapter
-    private lateinit var bookmarksListView: ListView
     private lateinit var bookmarksDrawerPinnedImageView: ImageView
     private lateinit var bookmarksFrameLayout: FrameLayout
+    private lateinit var bookmarksHeaderLinearLayout: LinearLayout
+    private lateinit var bookmarksListView: ListView
     private lateinit var bookmarksTitleTextView: TextView
     private lateinit var browserFrameLayout: FrameLayout
     private lateinit var coordinatorLayout: CoordinatorLayout
@@ -603,6 +604,7 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
             webViewViewPager2 = findViewById(R.id.webview_viewpager2)
             navigationView = findViewById(R.id.navigationview)
             bookmarksFrameLayout = findViewById(R.id.bookmarks_framelayout)
+            bookmarksHeaderLinearLayout = findViewById(R.id.bookmarks_header_linearlayout)
             bookmarksListView = findViewById(R.id.bookmarks_drawer_listview)
             bookmarksTitleTextView = findViewById(R.id.bookmarks_title_textview)
             bookmarksDrawerPinnedImageView = findViewById(R.id.bookmarks_drawer_pinned_imageview)
@@ -939,8 +941,8 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
         // Only save the instance state if the WebView state adapter is not null, which will be the case if the app is restarting to change the initial app theme.
         if (webViewStateAdapter != null) {
             // Initialize the saved state array lists.
-            savedStateArrayList = ArrayList<Bundle>()
-            savedNestedScrollWebViewStateArrayList = ArrayList<Bundle>()
+            savedStateArrayList = ArrayList()
+            savedNestedScrollWebViewStateArrayList = ArrayList()
 
             // Get the URLs from each tab.
             for (i in 0 until webViewStateAdapter!!.itemCount) {
@@ -4749,6 +4751,15 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
 
     @SuppressLint("ClickableViewAccessibility")
     override fun initializeWebView(nestedScrollWebView: NestedScrollWebView, pagePosition: Int, progressBar: ProgressBar, urlString: String, restoringState: Boolean) {
+        // Fix the bookmarks drawer top padding on API <= 29.
+        if (Build.VERSION.SDK_INT <= 29) {
+            // Set the top padding according to the app bar location.
+            if (bottomAppBar)
+                bookmarksListView.setPadding(bookmarksListView.paddingLeft, swipeRefreshLayout.top, bookmarksListView.paddingRight, bookmarksListView.paddingBottom)
+            else
+                bookmarksHeaderLinearLayout.setPadding(bookmarksHeaderLinearLayout.paddingLeft, appBarLayout.top, bookmarksHeaderLinearLayout.paddingRight, bookmarksHeaderLinearLayout.paddingBottom)
+        }
+
         // Get the WebView theme.
         val webViewTheme = sharedPreferences.getString(getString(R.string.webview_theme_key), getString(R.string.webview_theme_default_value))
 
index 1c8317685dec41e30d97d40ca269e4368aa86718..021e483b3b04cda4d1fed49601a4368765915e96 100644 (file)
@@ -2,7 +2,7 @@
 
 <!--
   SPDX-License-Identifier: GPL-3.0-or-later
-  SPDX-FileCopyrightText: 2017-2020, 2022, 2024 Soren Stoutner <soren@stoutner.com>
+  SPDX-FileCopyrightText: 2017-2020, 2022, 2024-2025 Soren Stoutner <soren@stoutner.com>
 
   This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android/>.
 
@@ -25,7 +25,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_height="match_parent"
     android:layout_width="match_parent"
-    android:layout_gravity="end">
+    android:layout_gravity="end" >
 
     <LinearLayout
         android:layout_height="match_parent"