urlRelativeLayout = findViewById(R.id.url_relativelayout)
urlEditText = findViewById(R.id.url_edittext)
+ // Store the URL when it is changed. This enables the restoring of partially-typed URLs when tabs change.
+ urlEditText.addTextChangedListener(object : TextWatcher {
+ override fun beforeTextChanged(charSequence: CharSequence, start: Int, count: Int, after: Int) {
+ // Do nothing.
+ }
+
+ override fun onTextChanged(charSequence: CharSequence, start: Int, before: Int, count: Int) {
+ // Do nothing.
+ }
+
+ override fun afterTextChanged(editable: Editable) {
+ // Store the URL
+ currentWebView?.currentUrl = editable.toString()
+ }
+ })
+
// Initially disable the sliding drawers. They will be enabled once the filter lists are loaded.
drawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED)
override fun afterTextChanged(editable: Editable) {
// Search for the text in the WebView if it is not null. Sometimes on resume after a period of non-use the WebView will be null.
- currentWebView?.findAllAsync(findOnPageEditText.text.toString())
+ currentWebView?.findAllAsync(editable.toString())
}
})
updatePrivacyIcons(true)
// Get the current URL.
- val urlString = currentWebView!!.url
+ val urlString = currentWebView!!.currentUrl
// Update the URL edit text if not loading a new intent. Otherwise, this will be handled by `onPageStarted()` (if called) and `onPageFinished()`.
if (!loadingNewIntent) { // A new intent is not being loaded.
- if ((urlString == null) || (urlString == "about:blank")) { // The WebView is blank.
+ if (urlString.isBlank()) { // The WebView is blank.
// Display the hint in the URL edit text.
urlEditText.text = null
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with Privacy Browser Android. If not, see <http://www.gnu.org/licenses/>.
+ * along with Privacy Browser Android. If not, see <https://www.gnu.org/licenses/>.
*/
package com.stoutner.privacybrowser.views
Translation 2017-2024 Jose A. León. Copyright assigned to Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
+ This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android/>.
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
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with Privacy Browser Android. If not, see <http://www.gnu.org/licenses/>. -->
+ along with Privacy Browser Android. If not, see <https://www.gnu.org/licenses/>. -->
<resources>
<!-- Activities. -->
<string name="selected">Seleccionados:\u0020 %1$d</string>
<string name="move_up">Subir</string>
<string name="move_down">Bajar</string>
+ <string name="move_to_top">Ir arriba</string>
+ <string name="move_to_bottom">Ir abajo</string>
<string name="edit">Editar</string>
<string name="delete">Borrar</string>
<string name="select_all">Selectionar todo</string>
Translation 2017-2024 Francesco Buratti. Copyright assigned to Soren Stoutner <soren@stoutner.com>.
- This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
+ This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android/>.
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
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with Privacy Browser Android. If not, see <http://www.gnu.org/licenses/>. -->
+ along with Privacy Browser Android. If not, see <https://www.gnu.org/licenses/>. -->
<resources>
<!-- Activities. -->
<string name="selected">Selezionato:\u0020 %1$d</string>
<string name="move_up">Sposta sopra</string>
<string name="move_down">Sposta sotto</string>
+ <string name="move_to_top">Sposta in Alto</string>
+ <string name="move_to_bottom">Sposta in Basso</string>
<string name="edit">Modifica</string>
<string name="delete">Elimina</string>
<string name="select_all">Seleziona tutto</string>
}
dependencies {
- classpath 'com.android.tools.build:gradle:8.6.1'
+ classpath 'com.android.tools.build:gradle:8.7.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"
// NOTE: Do not place your application dependencies here; they belong
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with Privacy Browser Android. If not, see <http://www.gnu.org/licenses/>.
+# along with Privacy Browser Android. If not, see <https://www.gnu.org/licenses/>.
#Thu Oct 15 14:40:42 MST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip