import android.view.View.OnFocusChangeListener
import android.view.WindowManager
import android.view.inputmethod.InputMethodManager
-import android.widget.Button
import android.widget.EditText
import android.widget.ProgressBar
import android.widget.TextView
import androidx.appcompat.app.ActionBar
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
+import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.app.NavUtils
import androidx.lifecycle.ViewModelProvider
import androidx.preference.PreferenceManager
private lateinit var urlEditText: EditText
private lateinit var sslInformationTitleTextView: TextView
private lateinit var sslInformationTextView: TextView
- private lateinit var ciphersButton: Button
- private lateinit var certificateButton: Button
+ private lateinit var sslButtonsConstraintLayout: ConstraintLayout
private lateinit var requestHeadersTitleTextView: TextView
private lateinit var requestHeadersTextView: TextView
private lateinit var responseMessageTitleTextView: TextView
val swipeRefreshLayout = findViewById<SwipeRefreshLayout>(R.id.swiperefreshlayout)
sslInformationTitleTextView = findViewById(R.id.ssl_information_title_textview)
sslInformationTextView = findViewById(R.id.ssl_information_textview)
- ciphersButton = findViewById(R.id.ciphers_button)
- certificateButton = findViewById(R.id.certificate_button)
+ sslButtonsConstraintLayout = findViewById(R.id.ssl_buttons_constraintlayout)
requestHeadersTitleTextView = findViewById(R.id.request_headers_title_textview)
requestHeadersTextView = findViewById(R.id.request_headers_textview)
responseMessageTitleTextView = findViewById(R.id.response_message_title_textview)
// Display a snackbar if the API <= 32 (Android 12L). Beginning in Android 13 the OS displays a notification that covers up the snackbar.
if (Build.VERSION.SDK_INT <= 32)
- Snackbar.make(urlEditText, R.string.version_info_copied, Snackbar.LENGTH_SHORT).show()
+ Snackbar.make(urlEditText, R.string.headers_copied, Snackbar.LENGTH_SHORT).show()
// Consume the event.
return true
// Hide the unused views.
sslInformationTitleTextView.visibility = View.GONE
sslInformationTextView.visibility = View.GONE
- ciphersButton.visibility = View.GONE
- certificateButton.visibility = View.GONE
+ sslButtonsConstraintLayout.visibility = View.GONE
requestHeadersTitleTextView.visibility = View.GONE
requestHeadersTextView.visibility = View.GONE
responseMessageTitleTextView.visibility = View.GONE
// Hide the SSL information views.
sslInformationTitleTextView.visibility = View.GONE
sslInformationTextView.visibility = View.GONE
- ciphersButton.visibility = View.GONE
- certificateButton.visibility = View.GONE
+ sslButtonsConstraintLayout.visibility = View.GONE
} else { // This is not an HTTP URL.
// Show the SSL information views.
sslInformationTitleTextView.visibility = View.VISIBLE
sslInformationTextView.visibility = View.VISIBLE
- ciphersButton.visibility = View.VISIBLE
- certificateButton.visibility = View.VISIBLE
+ sslButtonsConstraintLayout.visibility = View.VISIBLE
}
// Show the other views.
android:textIsSelectable="true"
android:layout_marginBottom="8dp" />
- <!-- Button row. -->
- <LinearLayout
+ <!-- SSL Buttons. -->
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/ssl_buttons_constraintlayout"
android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:orientation="horizontal"
- android:layout_gravity="center_horizontal" >
-
- <Button
- android:id="@+id/ciphers_button"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/ciphers"
- android:layout_gravity="center_horizontal"
- android:layout_marginEnd="10dp"
- android:layout_marginBottom="16dp"
- android:onClick="showCiphers"
- app:backgroundTint="@color/button_background_selector"
- android:textColor="@color/button_text_selector"
- tools:ignore="ButtonStyle" />
-
- <Button
- android:id="@+id/certificate_button"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:text="@string/certificate"
- android:onClick="showCertificate"
- app:backgroundTint="@color/button_background_selector"
- android:textColor="@color/button_text_selector"
- tools:ignore="ButtonStyle" />
- </LinearLayout>
+ android:layout_width="match_parent"
+ android:layout_marginBottom="16dp"
+ tools:ignore="MissingConstraints" >
+
+ <androidx.constraintlayout.helper.widget.Flow
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ app:constraint_referenced_ids="ciphers_button,certificate_button"
+ app:flow_wrapMode="chain"
+ app:flow_firstHorizontalStyle="packed"
+ app:flow_horizontalGap="15dp" />
+
+ <androidx.appcompat.widget.AppCompatButton
+ android:id="@+id/ciphers_button"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/ciphers"
+ android:onClick="showCiphers"
+ app:backgroundTint="@color/button_background_selector"
+ android:textColor="@color/button_text_selector"
+ tools:ignore="ButtonStyle" />
+
+ <androidx.appcompat.widget.AppCompatButton
+ android:id="@+id/certificate_button"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/certificate"
+ android:onClick="showCertificate"
+ app:backgroundTint="@color/button_background_selector"
+ android:textColor="@color/button_text_selector"
+ tools:ignore="ButtonStyle" />
+ </androidx.constraintlayout.widget.ConstraintLayout>
<!-- Request headers. -->
<TextView
android:textIsSelectable="true"
android:layout_marginBottom="8dp" />
- <!-- Button row. -->
- <LinearLayout
+ <!-- SSL Buttons. -->
+ <androidx.constraintlayout.widget.ConstraintLayout
+ android:id="@+id/ssl_buttons_constraintlayout"
android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:orientation="horizontal"
- android:layout_gravity="center_horizontal" >
+ android:layout_width="match_parent"
+ android:layout_marginBottom="16dp"
+ tools:ignore="MissingConstraints" >
+
+ <androidx.constraintlayout.helper.widget.Flow
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ app:constraint_referenced_ids="ciphers_button,certificate_button"
+ app:flow_wrapMode="chain"
+ app:flow_firstHorizontalStyle="packed"
+ app:flow_horizontalGap="15dp" />
- <Button
+ <androidx.appcompat.widget.AppCompatButton
android:id="@+id/ciphers_button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/ciphers"
- android:layout_gravity="center_horizontal"
- android:layout_marginEnd="10dp"
- android:layout_marginBottom="16dp"
android:onClick="showCiphers"
app:backgroundTint="@color/button_background_selector"
android:textColor="@color/button_text_selector"
tools:ignore="ButtonStyle" />
- <Button
+ <androidx.appcompat.widget.AppCompatButton
android:id="@+id/certificate_button"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
app:backgroundTint="@color/button_background_selector"
android:textColor="@color/button_text_selector"
tools:ignore="ButtonStyle" />
- </LinearLayout>
+ </androidx.constraintlayout.widget.ConstraintLayout>
<!-- Request headers. -->
<TextView
<string name="open_in_new_tab">In neuem Tab öffnen</string>
<string name="open_in_background">Im Hintergrund öffnen</string>
<string name="open_image_in_new_tab">Grafik in neuem Tab öffnen</string>
+ <string name="share_image">Bild teilen</string>
<string name="copy_url">URL kopieren</string>
<string name="email_address">E-Mail-Adresse</string>
<string name="copy_email_address">E-Mail-Adresse kopieren</string>
<!-- View Headers. Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
The `%1$s` code inserts variables into the displayed text and should be preserved in translation. <https://developer.android.com/reference/kotlin/java/util/Formatter> -->
<string name="colon">: \u0020</string>
+ <string name="ssl_information">SSL-Information</string>
+ <string name="applied_cipher">Verwendetes Verschlüsselungsverfahren</string>
+ <string name="peer_principal">Zielprinzipalname</string>
+ <string name="certificate_type">Zertifikats-Typ</string>
+ <string name="certificate_hash_code">Zertifikats-Hash</string>
+ <string name="ciphers">Verschlüsselungsverfahren</string>
+ <string name="available_ciphers">Verfügbare Verschlüsselungsverfahren</string>
+ <string name="certificate">Zertifikat</string>
<string name="request_headers">Anfragekopfzeilen</string>
<string name="response_message">Status-Code</string>
<string name="response_headers">Antwortkopfzeilen</string>
<string name="about_view_headers_message">Weil Androids WebView keine Quelltext-Informationen zur Verfügung stellt, muss eine separate a separate Serveranfrage mit system tools gestellt werden,
die hier dargestellten Daten erhält. Deshalb können Unterschiede zwischen diesen Daten und der mit WebView dargestellten Webseite auftreten.
Es ist geplant, mit Version 4.x eine eigene Engine einzuführen, die diese Einschränkungen umgeht.</string>
+ <string name="headers_copied">Header kopiert.</string>
+ <string name="headers_txt">%1$s headers.txt</string>
<!-- Create Home Screen Shortcut Alert Dialog. -->
<string name="create_shortcut">Verknüpfung erstellen</string>
<!-- Logcat. Android removes double spaces, but extra spaces can be manually specified with the Unicode `\u0020` formatting.
The `%1$s` code inserts variables into the displayed text and should be preserved in translation. <https://developer.android.com/reference/kotlin/java/util/Formatter> -->
- <string name="copy_string">kopieren</string>
- <string name="clear">leeren</string>
+ <string name="copy_string">Kopieren</string>
+ <string name="clear">Leeren</string>
<string name="logcat_copied">Logcat kopiert.</string>
<string name="privacy_browser_logcat_txt">Privacy Browser Android %1$s Logcat.txt</string>
<string name="error_saving_logcat">Fehler beim Speichern von Logcat:\u0020 %1$s</string>
<string name="open_in_new_tab">Abrir en nueva pestaña</string>
<string name="open_in_background">Abrir en segundo plano</string>
<string name="open_image_in_new_tab">Abrir imagen en nueva pestaña</string>
+ <string name="share_image">Compartir imagen</string>
<string name="copy_url">Copiar URL</string>
<string name="email_address">Correo electrónico</string>
<string name="copy_email_address">Copiar correo electrónico</string>
<string name="open_in_new_tab">Ouvrir dans un nouvel onglet</string>
<string name="open_in_background">Ouvrir en arrière-plan</string>
<string name="open_image_in_new_tab">Ouvrir l\'image dans un nouvel onglet</string>
+ <string name="share_image">Partager l\'image</string>
<string name="copy_url">Copier l\'URL</string>
<string name="email_address">Addresse e-mail</string>
<string name="copy_email_address">Copier l\'adresse e-mail</string>
<!-- View Headers. Android removes initial and trailing spaces, but they can be manually specified with the Unicode `\u0020` formatting.
The `%1$s` code inserts variables into the displayed text and should be preserved in translation. <https://developer.android.com/reference/kotlin/java/util/Formatter> -->
<string name="colon">\u0020:\u0020</string>
+ <string name="ssl_information">Information SSL</string>
+ <string name="applied_cipher">Chiffrement en vigueur</string>
+ <string name="peer_principal">Pair Principal</string>
+ <string name="certificate_type">Type de Certificat</string>
+ <string name="certificate_hash_code">Code de hachage du certificat</string>
+ <string name="ciphers">Chiffrements</string>
+ <string name="available_ciphers">Chiffrements disponibles</string>
+ <string name="certificate">Certificat</string>
<string name="request_headers">En-tête de la requête</string>
<string name="response_message">Message de la réponse</string>
<string name="response_headers">En-tête de la réponse</string>
<string name="about_view_headers_message">Puisqu\'Android Webview ne permet pas de révêler l\'information source,
une requête séparée a été effectuée en utilisant les outils sytèmes afin d\'afficher ce qui est présenté à l\'écran
Il peut donc y avoir des différences entre ces connées et celle utilisée par Webview. Cette limitation sera supprimée lors de la sortie de Privacy Webview 4.x</string>
+ <string name="headers_copied">En-têtes copiés.</string>
+ <string name="headers_txt">%1$s headers.txt</string>
<!-- Create Home Screen Shortcut Alert Dialog. -->
<string name="create_shortcut">Créer un raccourci</string>
<string name="open_in_new_tab">Apri in una nuova Scheda</string>
<string name="open_in_background">Apri in Background</string>
<string name="open_image_in_new_tab">Apri l\'immagine in una nuova scheda</string>
+ <string name="share_image">Condividi Immagine</string>
<string name="copy_url">Copia URL</string>
<string name="email_address">Indirizzo Email</string>
<string name="copy_email_address">Copia Indirizzo Email</string>
<string name="open_in_new_tab">Открыть в новой вкладке</string>
<string name="open_in_background">Открыть в фоне</string>
<string name="open_image_in_new_tab">Открыть изображение в новой вкладке</string>
+ <string name="share_image">Поделиться изображением</string>
<string name="copy_url">Копировать URL</string>
<string name="email_address">Адрес email</string>
<string name="copy_email_address">Копировать адрес email</string>