}
}
- override fun onAddDomain(dialogFragment: DialogFragment) {
+ override fun addDomain(dialogFragment: DialogFragment) {
// Dismiss the undo delete snackbar if it is currently displayed.
if (undoDeleteSnackbar != null && undoDeleteSnackbar!!.isShown)
undoDeleteSnackbar!!.dismiss()
val swipeToRefreshSpinner = view.findViewById<Spinner>(R.id.swipe_to_refresh_spinner)
val webViewThemeSpinner = view.findViewById<Spinner>(R.id.webview_theme_spinner)
val wideViewportSpinner = view.findViewById<Spinner>(R.id.wide_viewport_spinner)
- val displayWebpageImagesSpinner = view.findViewById<Spinner>(R.id.display_webpage_images_spinner)
+ val displayWebpageImagesSpinner = view.findViewById<Spinner>(R.id.display_images_spinner)
val pinnedSslCertificateSwitch = view.findViewById<SwitchCompat>(R.id.pinned_ssl_certificate_switch)
val currentWebsiteCertificateRadioButton = view.findViewById<RadioButton>(R.id.current_website_certificate_radiobutton)
val pinnedIpAddressesSwitch = view.findViewById<SwitchCompat>(R.id.pinned_ip_addresses_switch)
/*
- * Copyright © 2017-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2017-2023 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
*
// The public interface is used to send information back to the parent activity.
interface AddDomainListener {
- fun onAddDomain(dialogFragment: DialogFragment)
+ fun addDomain(dialogFragment: DialogFragment)
}
override fun onAttach(context: Context) {
// Set the add button listener.
dialogBuilder.setPositiveButton(R.string.add) { _: DialogInterface, _: Int ->
// Return the dialog fragment to the parent activity on add.
- addDomainListener.onAddDomain(this)
+ addDomainListener.addDomain(this)
}
// Create an alert dialog from the builder.
// Check the key code and event.
if (keyCode == KeyEvent.KEYCODE_ENTER && keyEvent.action == KeyEvent.ACTION_DOWN) { // The event is a key-down on the enter key.
// Trigger the add domain listener and return the dialog fragment to the parent activity.
- addDomainListener.onAddDomain(this)
+ addDomainListener.addDomain(this)
// Manually dismiss the alert dialog.
alertDialog.dismiss()
val ultraPrivacySwitch = domainSettingsView.findViewById<SwitchCompat>(R.id.ultraprivacy_switch)
val blockAllThirdPartyRequestsImageView = domainSettingsView.findViewById<ImageView>(R.id.block_all_third_party_requests_imageview)
val blockAllThirdPartyRequestsSwitch = domainSettingsView.findViewById<SwitchCompat>(R.id.block_all_third_party_requests_switch)
- val userAgentLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.user_agent_linear_layout)
+ val userAgentLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.user_agent_linearlayout)
val userAgentSpinner = domainSettingsView.findViewById<Spinner>(R.id.user_agent_spinner)
val userAgentTextView = domainSettingsView.findViewById<TextView>(R.id.user_agent_textview)
val customUserAgentEditText = domainSettingsView.findViewById<EditText>(R.id.custom_user_agent_edittext)
+ val fontSizeLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.font_size_linearlayout)
val fontSizeSpinner = domainSettingsView.findViewById<Spinner>(R.id.font_size_spinner)
val defaultFontSizeTextView = domainSettingsView.findViewById<TextView>(R.id.default_font_size_textview)
val customFontSizeEditText = domainSettingsView.findViewById<EditText>(R.id.custom_font_size_edittext)
+ val swipeToRefreshLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.swipe_to_refresh_linearlayout)
val swipeToRefreshImageView = domainSettingsView.findViewById<ImageView>(R.id.swipe_to_refresh_imageview)
val swipeToRefreshSpinner = domainSettingsView.findViewById<Spinner>(R.id.swipe_to_refresh_spinner)
val swipeToRefreshTextView = domainSettingsView.findViewById<TextView>(R.id.swipe_to_refresh_textview)
val webViewThemeImageView = domainSettingsView.findViewById<ImageView>(R.id.webview_theme_imageview)
val webViewThemeSpinner = domainSettingsView.findViewById<Spinner>(R.id.webview_theme_spinner)
val webViewThemeTextView = domainSettingsView.findViewById<TextView>(R.id.webview_theme_textview)
+ val wideViewportLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.wide_viewport_linearlayout)
val wideViewportImageView = domainSettingsView.findViewById<ImageView>(R.id.wide_viewport_imageview)
val wideViewportSpinner = domainSettingsView.findViewById<Spinner>(R.id.wide_viewport_spinner)
val wideViewportTextView = domainSettingsView.findViewById<TextView>(R.id.wide_viewport_textview)
- val displayWebpageImagesImageView = domainSettingsView.findViewById<ImageView>(R.id.display_webpage_images_imageview)
- val displayWebpageImagesSpinner = domainSettingsView.findViewById<Spinner>(R.id.display_webpage_images_spinner)
- val displayImagesTextView = domainSettingsView.findViewById<TextView>(R.id.display_webpage_images_textview)
+ val displayImagesLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.display_images_linearlayout)
+ val displayImagesImageView = domainSettingsView.findViewById<ImageView>(R.id.display_images_imageview)
+ val displayImagesSpinner = domainSettingsView.findViewById<Spinner>(R.id.display_images_spinner)
+ val displayImagesTextView = domainSettingsView.findViewById<TextView>(R.id.display_images_textview)
val pinnedSslCertificateImageView = domainSettingsView.findViewById<ImageView>(R.id.pinned_ssl_certificate_imageview)
val pinnedSslCertificateSwitch = domainSettingsView.findViewById<SwitchCompat>(R.id.pinned_ssl_certificate_switch)
val savedSslCardView = domainSettingsView.findViewById<CardView>(R.id.saved_ssl_certificate_cardview)
swipeToRefreshSpinner.adapter = swipeToRefreshArrayAdapter
webViewThemeSpinner.adapter = webViewThemeArrayAdapter
wideViewportSpinner.adapter = wideViewportArrayAdapter
- displayWebpageImagesSpinner.adapter = displayImagesArrayAdapter
+ displayImagesSpinner.adapter = displayImagesArrayAdapter
// Create a spannable string builder for each TextView that needs multiple colors of text.
val savedSslIssuedToCNameStringBuilder = SpannableStringBuilder(cNameLabel + savedSslIssuedToCNameString)
swipeToRefreshTextView.setOnClickListener { swipeToRefreshSpinner.performClick() }
webViewThemeTextView.setOnClickListener { webViewThemeSpinner.performClick() }
wideViewportTextView.setOnClickListener { wideViewportSpinner.performClick() }
- displayImagesTextView.setOnClickListener { displayWebpageImagesSpinner.performClick() }
+ displayImagesTextView.setOnClickListener { displayImagesSpinner.performClick() }
// Inflated a WebView to get the default user agent.
// `@SuppressLint("InflateParams")` removes the warning about using `null` as the `ViewGroup`, which in this case makes sense because the bare WebView should not be displayed on the screen.
// Set the default font size as the text of the custom font size edit text. This way, if the user switches to custom it will already be populated.
customFontSizeEditText.setText(defaultFontSizeString)
+
+ // Set the background color to be transparent.
+ fontSizeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
} else { // A custom font size is selected.
// Set the spinner to the custom font size.
fontSizeSpinner.setSelection(1)
// Set the custom font size.
customFontSizeEditText.setText(fontSizeInt.toString())
+
+ // Set the background color to be blue.
+ fontSizeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
// Initialize the default font size percentage string.
// Show the swipe-to-refresh text view.
swipeToRefreshTextView.visibility = View.VISIBLE
+
+ // Set the background color to be transparent.
+ swipeToRefreshLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
}
DomainsDatabaseHelper.ENABLED -> {
// Hide the swipe-to-refresh text view.
swipeToRefreshTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ swipeToRefreshLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
DomainsDatabaseHelper.DISABLED -> {
// Hide the swipe-to-refresh text view.
swipeToRefreshTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ swipeToRefreshLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
// Show the WebView theme text view.
webViewThemeTextView.visibility = View.VISIBLE
+
+ // Set the background color to be transparent.
+ webViewThemeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
}
DomainsDatabaseHelper.LIGHT_THEME -> {
// Hide the WebView theme text view.
webViewThemeTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ webViewThemeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
DomainsDatabaseHelper.DARK_THEME -> {
// Hide the WebView theme text view.
webViewThemeTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ webViewThemeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
// Set the default wide viewport text.
if (defaultWideViewport)
wideViewportTextView.text = wideViewportArrayAdapter.getItem(DomainsDatabaseHelper.ENABLED)
- else wideViewportTextView.text = wideViewportArrayAdapter.getItem(DomainsDatabaseHelper.DISABLED)
+ else
+ wideViewportTextView.text = wideViewportArrayAdapter.getItem(DomainsDatabaseHelper.DISABLED)
// Set the wide viewport icon and text view settings.
when (wideViewportInt) {
// Show the wide viewport text view.
wideViewportTextView.visibility = View.VISIBLE
+
+ // Set the background color to be transparent.
+ wideViewportLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
}
DomainsDatabaseHelper.ENABLED -> {
// Hide the wide viewport text view.
wideViewportTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ wideViewportLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
DomainsDatabaseHelper.DISABLED -> {
// Hide the wide viewport text view.
wideViewportTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ wideViewportLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
// Display the website images mode in the spinner.
- displayWebpageImagesSpinner.setSelection(displayImagesInt)
+ displayImagesSpinner.setSelection(displayImagesInt)
// Set the default display images text.
if (defaultDisplayWebpageImages)
when (displayImagesInt) {
DomainsDatabaseHelper.SYSTEM_DEFAULT -> {
// Set the icon color.
- displayWebpageImagesImageView.isSelected = defaultDisplayWebpageImages
+ displayImagesImageView.isSelected = defaultDisplayWebpageImages
// Show the display images text view.
displayImagesTextView.visibility = View.VISIBLE
+
+ // Set the background color to be transparent.
+ displayImagesLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
}
DomainsDatabaseHelper.ENABLED -> {
// Set the icon color.
- displayWebpageImagesImageView.isSelected = true
+ displayImagesImageView.isSelected = true
// Hide the display images text view.
displayImagesTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ displayImagesLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
DomainsDatabaseHelper.DISABLED -> {
// Set the icon color.
- displayWebpageImagesImageView.isSelected = false
+ displayImagesImageView.isSelected = false
// Hide the display images text view.
displayImagesTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ displayImagesLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
// Hide the custom font size edit text.
customFontSizeEditText.visibility = View.GONE
+
+ // Set the background color to be transparent.
+ fontSizeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
} else { // A custom font size has been selected.
// Hide the default font size text view.
defaultFontSizeTextView.visibility = View.GONE
// Show the custom font size edit text.
customFontSizeEditText.visibility = View.VISIBLE
+
+ // Set the background color to be blue.
+ fontSizeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
// Show the swipe-to-refresh text view.
swipeToRefreshTextView.visibility = View.VISIBLE
+
+ // Set the background color to be transparent.
+ swipeToRefreshLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
}
DomainsDatabaseHelper.ENABLED -> {
// Hide the swipe-to-refresh text view.
swipeToRefreshTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ swipeToRefreshLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
DomainsDatabaseHelper.DISABLED -> {
// Hide the swipe-to-refresh text view.
swipeToRefreshTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ swipeToRefreshLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
}
// Show the WebView theme text view.
webViewThemeTextView.visibility = View.VISIBLE
+
+ // Set the background color to be transparent.
+ webViewThemeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
}
DomainsDatabaseHelper.LIGHT_THEME -> {
// Hide the WebView theme text view.
webViewThemeTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ webViewThemeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
DomainsDatabaseHelper.DARK_THEME -> {
// Hide the WebView theme text view.
webViewThemeTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ webViewThemeLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
}
// Show the wide viewport text view.
wideViewportTextView.visibility = View.VISIBLE
+
+ // Set the background color to be transparent.
+ wideViewportLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
}
DomainsDatabaseHelper.ENABLED -> {
// Hide the wide viewport text view.
wideViewportTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ wideViewportLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
DomainsDatabaseHelper.DISABLED -> {
// Hid ethe wide viewport text view.
wideViewportTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ wideViewportLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
}
}
// Set the display webpage images spinner listener.
- displayWebpageImagesSpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
+ displayImagesSpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
// Update the icon and the visibility of the display images text view.
when (position) {
DomainsDatabaseHelper.SYSTEM_DEFAULT -> {
// Set the icon color.
- displayWebpageImagesImageView.isSelected = defaultDisplayWebpageImages
+ displayImagesImageView.isSelected = defaultDisplayWebpageImages
// Show the display images text view.
displayImagesTextView.visibility = View.VISIBLE
+
+ // Set the background color to be transparent.
+ displayImagesLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.transparent))
}
DomainsDatabaseHelper.ENABLED -> {
// Set the icon color.
- displayWebpageImagesImageView.isSelected = true
+ displayImagesImageView.isSelected = true
// Hide the display images text view.
displayImagesTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ displayImagesLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
DomainsDatabaseHelper.DISABLED -> {
// Set the icon color.
- displayWebpageImagesImageView.isSelected = false
+ displayImagesImageView.isSelected = false
// Hide the display images text view.
displayImagesTextView.visibility = View.GONE
+
+ // Set the background color to be blue.
+ displayImagesLinearLayout.setBackgroundColor(getColor(requireContext(), R.color.blue_background))
}
}
}
/*
- * Copyright © 2017-2022 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2017-2023 Soren Stoutner <soren@stoutner.com>.
*
* This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
*
domainContentValues.put(ULTRALIST, ultraList)
domainContentValues.put(ENABLE_ULTRAPRIVACY, ultraPrivacy)
domainContentValues.put(BLOCK_ALL_THIRD_PARTY_REQUESTS, blockAllThirdPartyRequests)
- domainContentValues.put(USER_AGENT, appContext.getString(R.string.user_agent_default_value))
+ domainContentValues.put(USER_AGENT, appContext.getString(R.string.system_default_user_agent))
domainContentValues.put(FONT_SIZE, 0)
domainContentValues.put(SWIPE_TO_REFRESH, 0)
domainContentValues.put(WEBVIEW_THEME, 0)
<ScrollView android:id="@+id/domain_settings_scrollview"
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:focusable="true"
android:focusableInTouchMode="true"
- android:descendantFocusability="beforeDescendants"
- xmlns:app="http://schemas.android.com/apk/res-auto">
+ android:descendantFocusability="beforeDescendants" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:layout_margin="12dp"
android:orientation="vertical"
android:divider="?android:attr/dividerVertical" >
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="vertical" >
+ android:orientation="vertical"
+ android:layout_marginTop="12dp"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<LinearLayout
android:layout_height="wrap_content"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/javascript_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/cookies_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/dom_storage_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/form_data_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/easylist_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/easyprivacy_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/fanboys_annoyance_list_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/fanboys_social_blocking_list_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/ultralist_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/ultraprivacy_imageview"
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
- android:orientation="horizontal" >
+ android:orientation="horizontal"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<ImageView
android:id="@+id/block_all_third_party_requests_imageview"
<!-- User Agent. -->
<LinearLayout
- android:id="@+id/user_agent_linear_layout"
+ android:id="@+id/user_agent_linearlayout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
- android:layout_marginTop="14dp"
- android:layout_marginBottom="14dp" >
+ android:padding="12dp" >
+
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/user_agent" />
<LinearLayout
android:layout_height="wrap_content"
<!-- Font Size. -->
<LinearLayout
+ android:id="@+id/font_size_linearlayout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
- android:layout_marginTop="14dp"
- android:layout_marginBottom="14dp" >
+ android:padding="12dp" >
+
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/font_size" />
<LinearLayout
android:layout_height="wrap_content"
<!-- Swipe to Refresh. -->
<LinearLayout
+ android:id="@+id/swipe_to_refresh_linearlayout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
- android:layout_marginTop="14dp"
- android:layout_marginBottom="14dp" >
+ android:padding="12dp" >
+
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/swipe_to_refresh" />
<LinearLayout
android:layout_height="wrap_content"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
- android:layout_marginTop="14dp"
- android:layout_marginBottom="14dp" >
+ android:padding="12dp" >
+
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/webview_theme" />
<LinearLayout
android:layout_height="wrap_content"
<!-- Wide Viewport. -->
<LinearLayout
+ android:id="@+id/wide_viewport_linearlayout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
- android:layout_marginTop="14dp"
- android:layout_marginBottom="14dp" >
+ android:padding="12dp" >
+
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/wide_viewport" />
<LinearLayout
android:layout_height="wrap_content"
<!-- Display Images. -->
<LinearLayout
+ android:id="@+id/display_images_linearlayout"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
- android:layout_marginTop="14dp"
- android:layout_marginBottom="14dp" >
+ android:padding="12dp" >
+
+ <TextView
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:text="@string/display_images" />
<LinearLayout
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageView
- android:id="@+id/display_webpage_images_imageview"
+ android:id="@+id/display_images_imageview"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginTop="1dp"
android:contentDescription="@string/display_webpage_images" />
<Spinner
- android:id="@+id/display_webpage_images_spinner"
+ android:id="@+id/display_images_spinner"
android:layout_height="wrap_content"
android:layout_width="match_parent" />
</LinearLayout>
<TextView
- android:id="@+id/display_webpage_images_textview"
+ android:id="@+id/display_images_textview"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginStart="45dp"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_marginTop="18dp"
- android:layout_marginBottom="18dp" >
+ android:layout_marginBottom="18dp"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp"
+ tools:ignore="TooManyViews" >
<!-- Switch -->
<LinearLayout
android:layout_marginStart="8dp"
android:text="@string/pinned_ssl_certificate"
android:textColor="?android:textColorPrimary"
- android:textSize="18sp"
- tools:ignore="TooManyViews" />
+ android:textSize="18sp" />
</LinearLayout>
<!-- Saved Certificate -->
android:textSize="17sp"
android:textAllCaps="true"
android:textStyle="bold"
- android:textColor="?android:textColorPrimary" />
+ android:textColor="?android:textColorPrimary"
+ tools:ignore="TooManyViews" />
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_marginTop="18dp"
- android:layout_marginBottom="18dp" >
+ android:layout_marginBottom="18dp"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" >
<!-- Switch -->
<LinearLayout