]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Fix navigation drawer scroll position on API < 35. https://redmine.stoutner.com...
authorSoren Stoutner <soren@stoutner.com>
Tue, 21 Jan 2025 16:48:07 +0000 (09:48 -0700)
committerSoren Stoutner <soren@stoutner.com>
Tue, 21 Jan 2025 16:48:07 +0000 (09:48 -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

index 9bbd3cf5d9d6c6056077981f05c0e8d58bb8ca55..83488b3f545208e2f392267f9c8c272bd13dd07c 100644 (file)
@@ -34,7 +34,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (Code-Version 78)</h3>
-        <p>10. Januar 2025 - Mindest-API 26, Ziel-API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10. Januar 2025</a> - Mindest-API 26, Ziel-API 35</p>
         <ul>
             <li><a href="https://redmine.stoutner.com/issues/1257">Layout der Lesezeichen-Leiste</a> unter Android <= 10 (API <= 29) korrigiert.</li>
         </ul>
index a95e6a93696c46e6e82ba8d3fbaee38f589800bc..940d8e08f9d093bc4328249cb93f543bdf16da87 100644 (file)
@@ -30,7 +30,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (version code 78)</h3>
-        <p>10 January 2025 - minimum API 26, target API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10 January 2025</a> - minimum API 26, target API 35</p>
         <ul>
             <li>Fix the <a href="https://redmine.stoutner.com/issues/1257">layout of the bookmarks drawer</a> on Android <= 10 (API <= 29).</li>
         </ul>
index eaa88ced8a2fa3b7eb45050d34cb876413b5cb36..c04eabdb492b8d7a6ef6ca319de469ad8309ed72 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (código de versión 78)</h3>
-        <p>10 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=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10 de enero de 2025</a> - API mínimo 26, API objetivo 35</p>
         <ul>
             <li>Arreglar el <a href="https://redmine.stoutner.com/issues/1257">diseño del cajón de favoritos</a> en Android <= 10 (API <= 29).</li>
         </ul>
index b6c30fe3b2d241852e31ecef61dd28e0610fcf15..46ecdbfb2e7eea9406b26e17c5b8e37fe0f06918 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (version du code 78)</h3>
-        <p>10 Janvier 2025 - API minimale : 26, API optimale : 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10 Janvier 2025</a> - API minimale : 26, API optimale : 35</p>
         <ul>
             <li>Fix the <a href="https://redmine.stoutner.com/issues/1257">layout of the bookmarks drawer</a> on Android <= 10 (API <= 29).</li>
         </ul>
index dddc089bb2a1c92dd286a03c0922721e5c4fcbf3..d0f24cf01c68ce38728c062dc61d05cd1e545040 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (versione codice 78)</h3>
-        <p>10 Gennaio 2025 - minima API 26, target API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10 Gennaio 2025</a> - minima API 26, target API 35</p>
         <ul>
             <li>Sistemazione del <a href="https://redmine.stoutner.com/issues/1257">layout del cassetto dei segnalibri</a> per Android <= 10 (API <= 29).</li>
         </ul>
index d4417d29e24adccc093fcfc089a2c3d8565913e3..fec05ae11c8d953c23e599eb997d2c4a210b0dec 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (código de versão 78)</h3>
-        <p>10 de janeiro de 2025 - minimum API 26, target API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10 de janeiro de 2025</a> - minimum API 26, target API 35</p>
         <ul>
             <li>Fix the <a href="https://redmine.stoutner.com/issues/1257">layout of the bookmarks drawer</a> on Android <= 10 (API <= 29).</li>
         </ul>
index 92395a1ced4a7884809fe92177b6da732f9c20af..968c1db5cfd2dae9850983d685564c7775bcecfe 100644 (file)
@@ -30,7 +30,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (код версии 78)</h3>
-        <p>10 января 2025 года - минимальный API 26, целевой API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10 января 2025 года</a> - минимальный API 26, целевой API 35</p>
         <ul>
             <li>Исправлено <a href="https://redmine.stoutner.com/issues/1257">расположение панели закладок</a> на Android <= 10 (API <= 29).</li>
         </ul>
index d8c8ad7ba1c1890ccf225e30381b1f697a2b39f4..cd69fe9100c0471b86e145fbae6c208496e7089b 100644 (file)
@@ -30,7 +30,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (version code 78)</h3>
-        <p>10 Ocak 2025 - minimum API 26, target API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10 Ocak 2025</a> - minimum API 26, target API 35</p>
         <ul>
             <li>Fix the <a href="https://redmine.stoutner.com/issues/1257">layout of the bookmarks drawer</a> on Android <= 10 (API <= 29).</li>
         </ul>
index 45612c88844aa238d7eae33e7507c7ef883e1f58..f993affbdb218776ca801b32f2e0397bded4f8c9 100644 (file)
@@ -32,7 +32,7 @@
 
     <body>
         <h3><a href="https://www.stoutner.com/privacy-browser-android-3-19-2">3.19.2</a> (version code 78)</h3>
-        <p>10 January 2025 - 最低支持API 26, 最高支持API 35</p>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=f8b46833b2246450a0a79067bbb1de044a6f9021;ds=sidebyside">10 January 2025</a> - 最低支持API 26, 最高支持API 35</p>
         <ul>
             <li>Fix the <a href="https://redmine.stoutner.com/issues/1257">layout of the bookmarks drawer</a> on Android <= 10 (API <= 29).</li>
         </ul>
index 230d5081ab0fc90baae4166959f73103d509301f..6a725efcca14e1dd8a2fb688667c55293819e443 100644 (file)
@@ -4676,6 +4676,33 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
 
             override fun onDrawerStateChanged(newState: Int) {
                 if (newState == DrawerLayout.STATE_SETTLING || newState == DrawerLayout.STATE_DRAGGING) {  // A drawer is opening or closing.
+                    // Adjust the scroll position of the navigation drawer.
+                    if (bottomAppBar && navigationDrawerFirstView) {  // The bottom app bar is in use.
+                        // Reset the navigation drawer first view flag.
+                        navigationDrawerFirstView = false
+
+                        // Get a handle for the navigation recycler view.
+                        val navigationRecyclerView = navigationView.getChildAt(0) as RecyclerView
+
+                        // Get the navigation linear layout manager.
+                        val navigationLinearLayoutManager = navigationRecyclerView.layoutManager as LinearLayoutManager
+
+                        // Scroll the navigation drawer to the bottom.
+                        navigationLinearLayoutManager.scrollToPositionWithOffset(14, 0)
+                    } else if (Build.VERSION.SDK_INT < 35 && navigationDrawerFirstView) {  // The top app bar is in use and the API < 35 (which causes the drawer to scroll down for some reason).
+                        // Reset the navigation drawer first view flag.
+                        navigationDrawerFirstView = false
+
+                        // Get a handle for the navigation recycler view.
+                        val navigationRecyclerView = navigationView.getChildAt(0) as RecyclerView
+
+                        // Get the navigation linear layout manager.
+                        val navigationLinearLayoutManager = navigationRecyclerView.layoutManager as LinearLayoutManager
+
+                        // Scroll the navigation drawer to the top.  <
+                        navigationLinearLayoutManager.scrollToPositionWithOffset(0, 0)
+                    }
+
                     // Update the navigation menu items if the WebView is not null.
                     if (currentWebView != null) {
                         // Set the enabled status of the menu items.
@@ -4712,20 +4739,6 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
                     // Clear the focus from from the WebView if it is not null, which can happen if a user opens a drawer while the browser is being resumed.
                     // Clearing the focus from the WebView removes any text selection markers and context menus, which otherwise draw above the open drawers.
                     currentWebView?.clearFocus()
-
-                    if (bottomAppBar && navigationDrawerFirstView) {
-                        // Reset the navigation drawer first view flag.
-                        navigationDrawerFirstView = false
-
-                        // Get a handle for the navigation recycler view.
-                        val navigationRecyclerView = navigationView.getChildAt(0) as RecyclerView
-
-                        // Get the navigation linear layout manager.
-                        val navigationLinearLayoutManager = navigationRecyclerView.layoutManager as LinearLayoutManager
-
-                        // Scroll the navigation drawer to the bottom.
-                        navigationLinearLayoutManager.scrollToPositionWithOffset(13, 0)
-                    }
                 }
             }
         })