1
0
Fork 0

For #12532: Align Settings -> Site permissions -> Sub-pages to 72dp keyline (#12680)

Co-authored-by: Hakkı Kaan Çalışkan <caliskanhkaan@gmail.com>
master
Elise Richards 2020-07-17 15:54:57 -05:00 committed by GitHub
parent 1823fdb66d
commit 37af9df3ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 96 additions and 91 deletions

View File

@ -2,24 +2,24 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public <!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<LinearLayout <LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/permissions_blocked_container" android:id="@+id/permissions_blocked_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:paddingStart="@dimen/radio_button_preference_horizontal" android:paddingStart="@dimen/radio_button_preference_horizontal"
android:paddingEnd="@dimen/radio_button_preference_horizontal" android:paddingEnd="@dimen/radio_button_preference_horizontal"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItem" android:textAppearance="?android:attr/textAppearanceListItem"
android:layout_marginStart="@dimen/site_permissions_exceptions_item_height"
android:text="@string/phone_feature_blocked_by_android" android:text="@string/phone_feature_blocked_by_android"
android:layout_marginBottom="16dp" /> android:layout_marginBottom="16dp" />
@ -27,21 +27,24 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall" android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:layout_marginStart="@dimen/site_permissions_exceptions_item_height"
android:text="@string/phone_feature_blocked_intro" android:text="@string/phone_feature_blocked_intro"
android:layout_marginBottom="16dp"/> android:layout_marginBottom="16dp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall" android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:layout_marginStart="@dimen/site_permissions_exceptions_item_height"
android:text="@string/phone_feature_blocked_step_settings" android:text="@string/phone_feature_blocked_step_settings"
android:layout_marginBottom="8dp"/> android:layout_marginBottom="8dp" />
<TextView <TextView
android:id="@+id/blocked_by_android_permissions_label" android:id="@+id/blocked_by_android_permissions_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall" android:textAppearance="?android:attr/textAppearanceListItemSmall"
android:layout_marginStart="@dimen/site_permissions_exceptions_item_height"
tools:text="@string/phone_feature_blocked_step_permissions" tools:text="@string/phone_feature_blocked_step_permissions"
android:layout_marginBottom="8dp" /> android:layout_marginBottom="8dp" />
@ -50,7 +53,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceListItemSmall" android:textAppearance="?android:attr/textAppearanceListItemSmall"
tools:text="@string/phone_feature_blocked_step_feature"/> android:layout_marginStart="@dimen/site_permissions_exceptions_item_height"
tools:text="@string/phone_feature_blocked_step_feature" />
<com.google.android.material.button.MaterialButton <com.google.android.material.button.MaterialButton
android:id="@+id/settings_button" android:id="@+id/settings_button"

View File

@ -6,18 +6,18 @@
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:layout_marginTop="@dimen/radio_button_preference_vertical"> android:layout_marginTop="@dimen/radio_button_preference_vertical">
<RadioGroup <RadioGroup
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<RadioButton <RadioButton
android:id="@+id/ask_to_allow_radio" android:id="@+id/ask_to_allow_radio"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -26,13 +26,13 @@
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:button="@null" android:button="@null"
app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle" app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle"
android:drawablePadding="@dimen/radio_button_preference_drawable_padding" android:drawablePadding="@dimen/preference_seek_bar_padding"
android:paddingTop="@dimen/radio_button_preference_vertical" android:paddingTop="@dimen/radio_button_preference_vertical"
android:paddingStart="@dimen/radio_button_preference_horizontal" android:paddingStart="@dimen/radio_button_preference_horizontal"
android:paddingEnd="@dimen/radio_button_preference_horizontal" android:paddingEnd="@dimen/radio_button_preference_horizontal"
android:paddingBottom="@dimen/radio_button_preference_vertical"/> android:paddingBottom="@dimen/radio_button_preference_vertical" />
<RadioButton <RadioButton
android:id="@+id/block_radio" android:id="@+id/block_radio"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/radio_button_preference_height" android:layout_height="@dimen/radio_button_preference_height"
@ -41,15 +41,15 @@
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:button="@null" android:button="@null"
app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle" app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle"
android:drawablePadding="@dimen/radio_button_preference_drawable_padding" android:drawablePadding="@dimen/preference_seek_bar_padding"
android:paddingTop="@dimen/radio_button_preference_vertical" android:paddingTop="@dimen/radio_button_preference_vertical"
android:paddingStart="@dimen/radio_button_preference_horizontal" android:paddingStart="@dimen/radio_button_preference_horizontal"
android:paddingEnd="@dimen/radio_button_preference_horizontal" android:paddingEnd="@dimen/radio_button_preference_horizontal"
android:paddingBottom="@dimen/radio_button_preference_vertical"/> android:paddingBottom="@dimen/radio_button_preference_vertical" />
</RadioGroup> </RadioGroup>
<include layout="@layout/layout_clear_permission_button"/> <include layout="@layout/layout_clear_permission_button" />
<include layout="@layout/component_permissions_blocked_by_android"/> <include layout="@layout/component_permissions_blocked_by_android" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>

View File

@ -7,76 +7,77 @@
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"> android:layout_height="fill_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="@dimen/radio_button_preference_vertical">
<RadioGroup <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="@dimen/radio_button_preference_vertical">
<RadioButton <RadioGroup
android:id="@+id/ask_to_allow_radio"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:background="?android:attr/selectableItemBackground"
android:button="@null"
android:drawablePadding="@dimen/radio_button_preference_drawable_padding"
android:paddingStart="@dimen/radio_button_preference_horizontal"
android:paddingTop="@dimen/radio_button_preference_vertical"
android:paddingEnd="@dimen/radio_button_preference_horizontal"
android:paddingBottom="@dimen/radio_button_preference_vertical"
android:textAppearance="?android:attr/textAppearanceListItem"
app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle"
tools:text="@string/preference_option_phone_feature_ask_to_allow" />
<RadioButton <RadioButton
android:id="@+id/block_radio" android:id="@+id/ask_to_allow_radio"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:button="@null" android:button="@null"
android:drawablePadding="@dimen/radio_button_preference_drawable_padding" android:drawablePadding="@dimen/preference_seek_bar_padding"
android:paddingStart="@dimen/radio_button_preference_horizontal" android:paddingStart="@dimen/radio_button_preference_horizontal"
android:paddingTop="@dimen/radio_button_preference_vertical" android:paddingTop="@dimen/radio_button_preference_vertical"
android:paddingEnd="@dimen/radio_button_preference_horizontal" android:paddingEnd="@dimen/radio_button_preference_horizontal"
android:paddingBottom="@dimen/radio_button_preference_vertical" android:paddingBottom="@dimen/radio_button_preference_vertical"
android:textAppearance="?android:attr/textAppearanceListItem" android:textAppearance="?android:attr/textAppearanceListItem"
app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle" app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle"
tools:text="@string/preference_option_phone_feature_blocked" /> tools:text="@string/preference_option_phone_feature_ask_to_allow" />
<RadioButton <RadioButton
android:id="@+id/third_radio" android:id="@+id/block_radio"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:button="@null" android:button="@null"
android:drawablePadding="@dimen/radio_button_preference_drawable_padding" android:drawablePadding="@dimen/preference_seek_bar_padding"
android:paddingStart="@dimen/radio_button_preference_horizontal" android:paddingStart="@dimen/radio_button_preference_horizontal"
android:paddingTop="@dimen/radio_button_preference_vertical" android:paddingTop="@dimen/radio_button_preference_vertical"
android:paddingEnd="@dimen/radio_button_preference_horizontal" android:paddingEnd="@dimen/radio_button_preference_horizontal"
android:paddingBottom="@dimen/radio_button_preference_vertical" android:paddingBottom="@dimen/radio_button_preference_vertical"
android:textAppearance="?android:attr/textAppearanceListItem" android:textAppearance="?android:attr/textAppearanceListItem"
app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle" /> app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle"
tools:text="@string/preference_option_phone_feature_blocked" />
<RadioButton <RadioButton
android:id="@+id/fourth_radio" android:id="@+id/third_radio"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:button="@null" android:button="@null"
android:drawablePadding="@dimen/radio_button_preference_drawable_padding" android:drawablePadding="@dimen/preference_seek_bar_padding"
android:paddingStart="@dimen/radio_button_preference_horizontal" android:paddingStart="@dimen/radio_button_preference_horizontal"
android:paddingTop="@dimen/radio_button_preference_vertical" android:paddingTop="@dimen/radio_button_preference_vertical"
android:paddingEnd="@dimen/radio_button_preference_horizontal" android:paddingEnd="@dimen/radio_button_preference_horizontal"
android:paddingBottom="@dimen/radio_button_preference_vertical" android:paddingBottom="@dimen/radio_button_preference_vertical"
android:textAppearance="?android:attr/textAppearanceListItem" android:textAppearance="?android:attr/textAppearanceListItem"
app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle" /> app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle" />
</RadioGroup>
<include layout="@layout/component_permissions_blocked_by_android"/> <RadioButton
android:id="@+id/fourth_radio"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:button="@null"
android:drawablePadding="@dimen/preference_seek_bar_padding"
android:paddingStart="@dimen/radio_button_preference_horizontal"
android:paddingTop="@dimen/radio_button_preference_vertical"
android:paddingEnd="@dimen/radio_button_preference_horizontal"
android:paddingBottom="@dimen/radio_button_preference_vertical"
android:textAppearance="?android:attr/textAppearanceListItem"
app:drawableStartCompat="?android:attr/listChoiceIndicatorSingle" />
</RadioGroup>
</LinearLayout> <include layout="@layout/component_permissions_blocked_by_android"/>
</LinearLayout>
</ScrollView> </ScrollView>