// Update the swipe refresh layout.
if (currentWebView.getSwipeToRefresh()) { // Swipe to refresh is enabled.
- if (Build.VERSION.SDK_INT >= 23) { // For API >= 23, the status of the scroll refresh listener is continuously updated by the on scroll change listener.
- // Only enable the swipe refresh layout if the WebView is scrolled to the top.
- swipeRefreshLayout.setEnabled(currentWebView.getY() == 0);
- } else { // For API < 23, the swipe refresh layout is always enabled.
- // Enable the swipe refresh layout.
- swipeRefreshLayout.setEnabled(true);
- }
+ // Only enable the swipe refresh layout if the WebView is scrolled to the top. It is updated every time the scroll changes.
+ swipeRefreshLayout.setEnabled(currentWebView.getY() == 0);
} else { // Swipe to refresh is disabled.
// Disable the swipe refresh layout.
swipeRefreshLayout.setEnabled(false);
EditText urlEditText = findViewById(R.id.url_edittext);
SwipeRefreshLayout swipeRefreshLayout = findViewById(R.id.swiperefreshlayout);
- //Stop the swipe to refresh indicator if it is running
+ // Stop the swipe to refresh indicator if it is running
swipeRefreshLayout.setRefreshing(false);
// Get the WebView tab fragment.
View fragmentView = webViewTabFragment.getView();
// Set the current WebView if the fragment view is not null.
- if (fragmentView != null) {
+ if (fragmentView != null) { // The fragment has been populated.
// Store the current WebView.
currentWebView = fragmentView.findViewById(R.id.nestedscroll_webview);
// Update the status of swipe to refresh.
if (currentWebView.getSwipeToRefresh()) { // Swipe to refresh is enabled.
- if (Build.VERSION.SDK_INT >= 23) { // For API >= 23, swipe refresh layout is continuously updated with an on scroll change listener and only enabled if the WebView is scrolled to the top.
- // Enable the swipe refresh layout if the WebView is scrolled all the way to the top.
- swipeRefreshLayout.setEnabled(currentWebView.getY() == 0);
- } else {
- // Enable the swipe refresh layout.
- swipeRefreshLayout.setEnabled(true);
- }
+ // Enable the swipe refresh layout if the WebView is scrolled all the way to the top. It is updated every time the scroll changes.
+ swipeRefreshLayout.setEnabled(currentWebView.getY() == 0);
} else { // Swipe to refresh is disabled.
// Disable the swipe refresh layout.
swipeRefreshLayout.setEnabled(false);
} else {
urlRelativeLayout.setBackground(getResources().getDrawable(R.color.transparent));
}
+ } else { // The fragment has not been populated. Try again in 100 milliseconds.
+ // Create a handler to set the current WebView.
+ Handler setCurrentWebViewHandler = new Handler();
+
+ // Create a runnable to set the current WebView.
+ Runnable setCurrentWebWebRunnable = () -> {
+ // Set the current WebView.
+ setCurrentWebView(pageNumber);
+ };
+
+ // Try setting the current WebView again after 100 milliseconds.
+ setCurrentWebViewHandler.postDelayed(setCurrentWebWebRunnable, 100);
}
}
<string name="clear_cookies">Cookies löschen</string>
<string name="clear_dom_storage">DOM-Speicher löschen</string>
<string name="clear_form_data">Formulardaten löschen</string>
- <string name="options_fanboys_annoyance_list">Fanboy’s Annoyance Sperrliste</string>
- <string name="options_fanboys_social_blocking_list">Fanboy’s Social Blocking Sperrliste</string>
- <string name="options_block_all_third_party_requests">Alle Zugriffe auf Dritt-Anbieter-Inhalte blockieren</string>
+ <string name="options_fanboys_annoyance_list">Fanboy’s Annoyance Sperrliste</string>
+ <string name="options_fanboys_social_blocking_list">Fanboy’s Social Blocking Sperrliste</string>
+ <string name="options_block_all_third_party_requests">Alle Zugriffe auf Dritt-Anbieter-Inhalte blockieren</string>
+ <string name="page">Seite</string>
<string name="options_user_agent">User Agent</string>
<string name="user_agent_privacy_browser">Privacy Browser</string>
<string name="user_agent_webview_default">WebView-Standard</string>
<string name="clear_cookies">Borrar cookies</string>
<string name="clear_dom_storage">Borrar almacenamiento DOM</string>
<string name="clear_form_data">Borrar datos de formulario</string> <!-- The form data strings can be removed once the minimum API >= 26. -->
- <string name="options_fanboys_annoyance_list">Lista molesta de Fanboy</string>
- <string name="options_fanboys_social_blocking_list">Lista de bloqueo social de Fanboy</string>
- <string name="options_block_all_third_party_requests">Bloquear todas las solicitudes de terceros</string>
+ <string name="options_fanboys_annoyance_list">Lista molesta de Fanboy</string>
+ <string name="options_fanboys_social_blocking_list">Lista de bloqueo social de Fanboy</string>
+ <string name="options_block_all_third_party_requests">Bloquear todas las solicitudes de terceros</string>
+ <string name="page">Página</string>
<string name="options_user_agent">Agente de usuario</string>
<string name="user_agent_privacy_browser">Navegador Privado</string>
<string name="user_agent_webview_default">WebView por defecto</string>
<string name="clear_cookies">Elimina cookies</string>
<string name="clear_dom_storage">Elimina DOM storage</string>
<string name="clear_form_data">Elimina dati dei moduli</string>
- <string name="options_fanboys_annoyance_list">Fanboy’s annoyance list</string>
- <string name="options_fanboys_social_blocking_list">Fanboy’s social blocking list</string>
- <string name="options_block_all_third_party_requests">Blocca tutte le richieste di Terze Parti</string>
+ <string name="options_fanboys_annoyance_list">Fanboy’s annoyance list</string>
+ <string name="options_fanboys_social_blocking_list">Fanboy’s social blocking list</string>
+ <string name="options_block_all_third_party_requests">Blocca tutte le richieste di Terze Parti</string>
+ <string name="page">Pagina</string>
<string name="options_user_agent">User agent</string>
<string name="user_agent_privacy_browser">Privacy Browser</string>
<string name="user_agent_webview_default">WebView Default</string>
<string name="one_hundred_seventy_five_percent">175%</string>
<string name="two_hundred_percent">200%</string>
<string name="swipe_to_refresh_options_menu">Swipe per aggiornare</string>
+ <string name="wide_viewport">Finestra grande</string>
<string name="display_images">Mostra immagini</string>
<string name="options_night_mode">Modalità Notte</string>
<string name="find_on_page">Cerca nella pagina</string>
</string-array>
<string-array name="wide_viewport_array">
<item>Impostazioni di default</item>
- <item>Wide viewport enabled</item>
- <item>Wide viewport disabled</item>
+ <item>Finestra grande abilitata</item>
+ <item>Finestra grande disabilitata</item>
</string-array>
<string-array name="display_webpage_images_array">
<item>Impostazioni di default</item>
<string name="dark_theme_summary">La modifica del tema provocherà il riavvio di Privacy Browser.</string>
<string name="night_mode">Modalità Notte</string>
<string name="night_mode_summary">L\'abilitazione della modalità notte attiva anche JavaScript per tutte le pagine web.</string>
+ <string name="wide_viewport_preference">Finestra grande</string>
+ <string name="wide_viewport_summary">L\'utilizzo di una finestra grande permette la visualizzazione di alcune pagine web come in modalità desktop.</string>
<string name="display_webpage_images">Mostra immagini delle pagine web</string>
<string name="display_webpage_images_summary">Disabilita per ridurre il consumo di dati.</string>
<string name="clear_cookies">Очистить cookie</string>
<string name="clear_dom_storage"> Очистить DOM-хранилище</string>
<string name="clear_form_data">Очистить данные формы</string>
- <string name="options_fanboys_annoyance_list">Fanboy’s annoyance list</string>
- <string name="options_fanboys_social_blocking_list">Fanboy’s social blocking list</string>
- <string name="options_block_all_third_party_requests">Блокировать все сторонние запросы</string>
+ <string name="options_fanboys_annoyance_list">Fanboy’s annoyance list</string>
+ <string name="options_fanboys_social_blocking_list">Fanboy’s social blocking list</string>
+ <string name="options_block_all_third_party_requests">Блокировать все сторонние запросы</string>
+ <string name="page">Страница</string>
<string name="options_user_agent">User agent</string>
<string name="user_agent_privacy_browser">Privacy Browser</string>
<string name="user_agent_webview_default">WebView по умолчанию</string>
<string name="clear_cookies">Çerezleri Temizle</string>
<string name="clear_dom_storage">DOM Depolamasını Temizle</string>
<string name="clear_form_data">Form Verisini Temizle</string> <!-- The form data strings can be removed once the minimum API >= 26. -->
- <string name="options_fanboys_annoyance_list">Fanboy’s Annoyance List</string>
- <string name="options_fanboys_social_blocking_list">Fanboy’s Social Blocking List</string>
- <string name="options_block_all_third_party_requests">Tüm Üçüncü Taraf İstekleri Engelle</string>
+ <string name="options_fanboys_annoyance_list">Fanboy’s Annoyance List</string>
+ <string name="options_fanboys_social_blocking_list">Fanboy’s Social Blocking List</string>
+ <string name="options_block_all_third_party_requests">Tüm Üçüncü Taraf İstekleri Engelle</string>
+ <string name="page">Sayfa</string>
<string name="options_user_agent">Kullanıcı aracısı</string>
<string name="user_agent_privacy_browser">Privacy Browser</string>
<string name="user_agent_webview_default">Varsayılan WebView</string>
<string name="clear_cookies">Clear Cookies</string>
<string name="clear_dom_storage">Clear DOM Storage</string>
<string name="clear_form_data">Clear Form Data</string> <!-- The form data strings can be removed once the minimum API >= 26. -->
- <string name="options_fanboys_annoyance_list">Fanboy’s Annoyance List</string>
- <string name="options_fanboys_social_blocking_list">Fanboy’s Social Blocking List</string>
- <string name="options_block_all_third_party_requests">Block All Third-Party Requests</string>
+ <string name="options_fanboys_annoyance_list">Fanboy’s Annoyance List</string>
+ <string name="options_fanboys_social_blocking_list">Fanboy’s Social Blocking List</string>
+ <string name="options_block_all_third_party_requests">Block All Third-Party Requests</string>
<string name="page">Page</string>
<string name="options_user_agent">User Agent</string>
<string name="user_agent_privacy_browser">Privacy Browser</string>