Merge "Fix preview screen crashing and glitches for Display / Font size Bug: 28223545 Bug: 28223533 Bug: 28210654 Bug: 28210242 Bug: 28208955 Bug: 27699996" into nyc-dev
This commit is contained in:
@@ -1478,8 +1478,7 @@
|
|||||||
<activity android:name=".accessibility.AccessibilitySettingsForSetupWizardActivity"
|
<activity android:name=".accessibility.AccessibilitySettingsForSetupWizardActivity"
|
||||||
android:label="@string/vision_settings_title"
|
android:label="@string/vision_settings_title"
|
||||||
android:theme="@style/SetupWizardAccessibilityTheme"
|
android:theme="@style/SetupWizardAccessibilityTheme"
|
||||||
android:taskAffinity="com.android.wizard"
|
android:taskAffinity="com.android.wizard" >
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize" >
|
|
||||||
<intent-filter android:priority="1">
|
<intent-filter android:priority="1">
|
||||||
<action android:name="android.settings.ACCESSIBILITY_SETTINGS_FOR_SUW" />
|
<action android:name="android.settings.ACCESSIBILITY_SETTINGS_FOR_SUW" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
@@ -14,26 +14,19 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_weight="1"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<include layout="@layout/preview_seek_bar_view_pager" />
|
<include layout="@layout/preview_seek_bar_view_pager" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="16dp"
|
|
||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
|
||||||
|
|
||||||
<com.android.settings.widget.DotsPageIndicator
|
<com.android.settings.widget.DotsPageIndicator
|
||||||
android:id="@+id/page_indicator"
|
android:id="@+id/page_indicator"
|
||||||
style="@style/PreviewPagerPageIndicator"
|
style="@style/PreviewPagerPageIndicator"
|
||||||
@@ -41,6 +34,21 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:padding="6dp" />
|
android:padding="6dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/current_label"
|
android:id="@+id/current_label"
|
||||||
@@ -51,16 +59,22 @@
|
|||||||
android:textAppearance="@android:style/TextAppearance.Material.Widget.TextView"
|
android:textAppearance="@android:style/TextAppearance.Material.Widget.TextView"
|
||||||
android:elevation="2dp" />
|
android:elevation="2dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<com.android.settings.widget.LabeledSeekBar
|
||||||
|
android:id="@+id/seek_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
style="@android:style/Widget.Material.SeekBar.Discrete" />
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:paddingTop="8dp">
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/smaller"
|
android:id="@+id/smaller"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_font_size_16dp"
|
android:src="@drawable/ic_font_size_16dp"
|
||||||
android:tint="?android:attr/textColorPrimary"
|
android:tint="?android:attr/textColorPrimary"
|
||||||
@@ -69,17 +83,11 @@
|
|||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:contentDescription="@string/font_size_make_smaller_desc" />
|
android:contentDescription="@string/font_size_make_smaller_desc" />
|
||||||
|
|
||||||
<com.android.settings.widget.LabeledSeekBar
|
|
||||||
android:id="@+id/seek_bar"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
style="@android:style/Widget.Material.SeekBar.Discrete"/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/larger"
|
android:id="@+id/larger"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_font_size_24dp"
|
android:src="@drawable/ic_font_size_24dp"
|
||||||
android:tint="?android:attr/textColorPrimary"
|
android:tint="?android:attr/textColorPrimary"
|
||||||
@@ -87,7 +95,7 @@
|
|||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:contentDescription="@string/font_size_make_larger_desc" />
|
android:contentDescription="@string/font_size_make_larger_desc" />
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -96,5 +104,5 @@
|
|||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</ScrollView>
|
||||||
</ScrollView>
|
</LinearLayout>
|
@@ -14,26 +14,19 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_weight="1"
|
||||||
|
android:layout_height="match_parent" >
|
||||||
|
|
||||||
<include layout="@layout/preview_seek_bar_view_pager" />
|
<include layout="@layout/preview_seek_bar_view_pager" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="16dp"
|
|
||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
|
||||||
|
|
||||||
<com.android.settings.widget.DotsPageIndicator
|
<com.android.settings.widget.DotsPageIndicator
|
||||||
android:id="@+id/page_indicator"
|
android:id="@+id/page_indicator"
|
||||||
style="@style/PreviewPagerPageIndicator"
|
style="@style/PreviewPagerPageIndicator"
|
||||||
@@ -41,6 +34,21 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:padding="6dp" />
|
android:padding="6dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ScrollView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="16dp"
|
||||||
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/current_label"
|
android:id="@+id/current_label"
|
||||||
@@ -51,7 +59,13 @@
|
|||||||
android:textAppearance="@android:style/TextAppearance.Material.Widget.TextView"
|
android:textAppearance="@android:style/TextAppearance.Material.Widget.TextView"
|
||||||
android:elevation="2dp" />
|
android:elevation="2dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<com.android.settings.widget.LabeledSeekBar
|
||||||
|
android:id="@+id/seek_bar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
style="@android:style/Widget.Material.SeekBar.Discrete"/>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
@@ -60,6 +74,7 @@
|
|||||||
android:id="@+id/smaller"
|
android:id="@+id/smaller"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_remove_24dp"
|
android:src="@drawable/ic_remove_24dp"
|
||||||
android:tint="?android:attr/textColorPrimary"
|
android:tint="?android:attr/textColorPrimary"
|
||||||
@@ -68,17 +83,11 @@
|
|||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:contentDescription="@string/screen_zoom_make_smaller_desc" />
|
android:contentDescription="@string/screen_zoom_make_smaller_desc" />
|
||||||
|
|
||||||
<com.android.settings.widget.LabeledSeekBar
|
|
||||||
android:id="@+id/seek_bar"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
style="@android:style/Widget.Material.SeekBar.Discrete"/>
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/larger"
|
android:id="@+id/larger"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||||
android:src="@drawable/ic_add_24dp"
|
android:src="@drawable/ic_add_24dp"
|
||||||
android:tint="?android:attr/textColorPrimary"
|
android:tint="?android:attr/textColorPrimary"
|
||||||
@@ -86,7 +95,7 @@
|
|||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:contentDescription="@string/screen_zoom_make_larger_desc" />
|
android:contentDescription="@string/screen_zoom_make_larger_desc" />
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -95,5 +104,5 @@
|
|||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</ScrollView>
|
||||||
</ScrollView>
|
</LinearLayout>
|
@@ -25,7 +25,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:minHeight="@dimen/conversation_message_contact_icon_size"
|
|
||||||
android:layout_marginTop="0dp" >
|
android:layout_marginTop="0dp" >
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/conversation_icon"
|
android:id="@+id/conversation_icon"
|
||||||
android:layout_width="@dimen/conversation_message_contact_icon_size"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/conversation_message_contact_icon_size"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="sans-serif"
|
android:fontFamily="sans-serif"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textSize="@dimen/conversation_message_contact_icon_text_size"
|
android:textSize="@dimen/conversation_message_contact_icon_text_size"
|
||||||
|
@@ -19,6 +19,13 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true">
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" >
|
||||||
|
|
||||||
|
<include layout="@layout/preview_seek_bar_view_pager" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -27,6 +34,14 @@
|
|||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||||
|
|
||||||
|
<com.android.settings.widget.DotsPageIndicator
|
||||||
|
android:id="@+id/page_indicator"
|
||||||
|
style="@style/PreviewPagerPageIndicator"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:padding="6dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/current_label"
|
android:id="@+id/current_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -81,4 +96,5 @@
|
|||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:minHeight="@dimen/preview_pager_min_height"
|
|
||||||
android:padding="@dimen/preview_pager_padding"
|
android:padding="@dimen/preview_pager_padding"
|
||||||
android:background="@drawable/preview_seek_bar_outline" >
|
android:background="@drawable/preview_seek_bar_outline" >
|
||||||
|
|
||||||
|
@@ -19,6 +19,13 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fillViewport="true">
|
android:fillViewport="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" >
|
||||||
|
|
||||||
|
<include layout="@layout/preview_seek_bar_view_pager" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -27,6 +34,14 @@
|
|||||||
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
|
||||||
|
|
||||||
|
<com.android.settings.widget.DotsPageIndicator
|
||||||
|
android:id="@+id/page_indicator"
|
||||||
|
style="@style/PreviewPagerPageIndicator"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:padding="6dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/current_label"
|
android:id="@+id/current_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -80,4 +95,5 @@
|
|||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
android:textAppearance="@android:style/TextAppearance.Material.Subhead" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
@@ -263,10 +263,8 @@
|
|||||||
<dimen name="unmount_button_padding">8dp</dimen>
|
<dimen name="unmount_button_padding">8dp</dimen>
|
||||||
|
|
||||||
<!-- Display, Screen zoom -->
|
<!-- Display, Screen zoom -->
|
||||||
<dimen name="screen_zoom_preview_height">240dp</dimen>
|
|
||||||
<dimen name="screen_zoom_preview_app_icon_width">88dp</dimen>
|
<dimen name="screen_zoom_preview_app_icon_width">88dp</dimen>
|
||||||
<dimen name="conversation_message_list_padding">10dp</dimen>
|
<dimen name="conversation_message_list_padding">10dp</dimen>
|
||||||
<dimen name="conversation_message_contact_icon_size">42dp</dimen>
|
|
||||||
<dimen name="conversation_message_contact_icon_text_size">32sp</dimen>
|
<dimen name="conversation_message_contact_icon_text_size">32sp</dimen>
|
||||||
<dimen name="conversation_message_text_size">16sp</dimen>
|
<dimen name="conversation_message_text_size">16sp</dimen>
|
||||||
<dimen name="conversation_status_text_size">12sp</dimen>
|
<dimen name="conversation_status_text_size">12sp</dimen>
|
||||||
@@ -282,9 +280,6 @@
|
|||||||
<dimen name="accessibility_layout_margin_start_end">24dp</dimen>
|
<dimen name="accessibility_layout_margin_start_end">24dp</dimen>
|
||||||
<dimen name="accessibility_button_preference_padding_top_bottom">18dp</dimen>
|
<dimen name="accessibility_button_preference_padding_top_bottom">18dp</dimen>
|
||||||
|
|
||||||
<!-- Accessibility, Font size -->
|
|
||||||
<dimen name="font_size_preview_height">240dp</dimen>
|
|
||||||
|
|
||||||
<!-- Accessibility, Screen magnification. These values are meant to be relative values and the actual layout value will be set programmatically. -->
|
<!-- Accessibility, Screen magnification. These values are meant to be relative values and the actual layout value will be set programmatically. -->
|
||||||
<dimen name="screen_magnification_video_background_width">750dp</dimen>
|
<dimen name="screen_magnification_video_background_width">750dp</dimen>
|
||||||
<dimen name="screen_magnification_video_background_height">383dp</dimen>
|
<dimen name="screen_magnification_video_background_height">383dp</dimen>
|
||||||
@@ -297,7 +292,6 @@
|
|||||||
|
|
||||||
<!-- Display Size and Font Size preview screen -->
|
<!-- Display Size and Font Size preview screen -->
|
||||||
<dimen name="preview_pager_padding">8dp</dimen>
|
<dimen name="preview_pager_padding">8dp</dimen>
|
||||||
<dimen name="preview_pager_min_height">240dp</dimen>
|
|
||||||
|
|
||||||
<!-- Padding between the radio buttons/checkbox and text on the redaction interstitial -->
|
<!-- Padding between the radio buttons/checkbox and text on the redaction interstitial -->
|
||||||
<dimen name="redaction_padding_start">16dp</dimen>
|
<dimen name="redaction_padding_start">16dp</dimen>
|
||||||
|
@@ -156,7 +156,6 @@ public abstract class PreviewSeekBarPreferenceFragment extends SettingsPreferenc
|
|||||||
}
|
}
|
||||||
|
|
||||||
mPreviewPager = (ViewPager) content.findViewById(R.id.preview_pager);
|
mPreviewPager = (ViewPager) content.findViewById(R.id.preview_pager);
|
||||||
if (mPreviewPager != null) {
|
|
||||||
mPreviewPagerAdapter = new PreviewPagerAdapter(context, isLayoutRtl,
|
mPreviewPagerAdapter = new PreviewPagerAdapter(context, isLayoutRtl,
|
||||||
mPreviewSampleResIds, configurations);
|
mPreviewSampleResIds, configurations);
|
||||||
mPreviewPager.setAdapter(mPreviewPagerAdapter);
|
mPreviewPager.setAdapter(mPreviewPagerAdapter);
|
||||||
@@ -171,7 +170,6 @@ public abstract class PreviewSeekBarPreferenceFragment extends SettingsPreferenc
|
|||||||
} else {
|
} else {
|
||||||
mPageIndicator.setVisibility(View.GONE);
|
mPageIndicator.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
setPreviewLayer(mInitialIndex, false);
|
setPreviewLayer(mInitialIndex, false);
|
||||||
return root;
|
return root;
|
||||||
@@ -191,11 +189,9 @@ public abstract class PreviewSeekBarPreferenceFragment extends SettingsPreferenc
|
|||||||
mLabel.setText(mEntries[index]);
|
mLabel.setText(mEntries[index]);
|
||||||
mSmaller.setEnabled(index > 0);
|
mSmaller.setEnabled(index > 0);
|
||||||
mLarger.setEnabled(index < mEntries.length - 1);
|
mLarger.setEnabled(index < mEntries.length - 1);
|
||||||
if (mPreviewPager != null) {
|
|
||||||
setPagerIndicatorContentDescription(mPreviewPager.getCurrentItem());
|
setPagerIndicatorContentDescription(mPreviewPager.getCurrentItem());
|
||||||
mPreviewPagerAdapter.setPreviewLayer(index, mCurrentIndex,
|
mPreviewPagerAdapter.setPreviewLayer(index, mCurrentIndex,
|
||||||
mPreviewPager.getCurrentItem(), animate);
|
mPreviewPager.getCurrentItem(), animate);
|
||||||
}
|
|
||||||
|
|
||||||
mCurrentIndex = index;
|
mCurrentIndex = index;
|
||||||
}
|
}
|
||||||
|
@@ -96,13 +96,15 @@ public class ConversationMessageView extends FrameLayout {
|
|||||||
updateViewAppearance();
|
updateViewAppearance();
|
||||||
|
|
||||||
final int horizontalSpace = MeasureSpec.getSize(widthMeasureSpec);
|
final int horizontalSpace = MeasureSpec.getSize(widthMeasureSpec);
|
||||||
final int iconSize = getResources()
|
|
||||||
.getDimensionPixelSize(R.dimen.conversation_message_contact_icon_size);
|
|
||||||
|
|
||||||
final int unspecifiedMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
|
final int unspecifiedMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
|
||||||
final int iconMeasureSpec = MeasureSpec.makeMeasureSpec(iconSize, MeasureSpec.EXACTLY);
|
int iconMeasureSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
|
||||||
|
|
||||||
mContactIconView.measure(iconMeasureSpec, iconMeasureSpec);
|
mContactIconView.measure(iconMeasureSpec, iconMeasureSpec);
|
||||||
|
iconMeasureSpec = MeasureSpec.makeMeasureSpec(
|
||||||
|
Math.max(mContactIconView.getMeasuredWidth(), mContactIconView.getMeasuredHeight()),
|
||||||
|
MeasureSpec.EXACTLY);
|
||||||
|
mContactIconView.measure(iconMeasureSpec, iconMeasureSpec);
|
||||||
|
|
||||||
final int arrowWidth =
|
final int arrowWidth =
|
||||||
getResources().getDimensionPixelSize(R.dimen.message_bubble_arrow_width);
|
getResources().getDimensionPixelSize(R.dimen.message_bubble_arrow_width);
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package com.android.settings.widget;
|
package com.android.settings.widget;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.res.Configuration;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.view.ViewCompat;
|
import android.support.v4.view.ViewCompat;
|
||||||
@@ -24,6 +25,7 @@ import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
|
|||||||
import android.support.v4.widget.ExploreByTouchHelper;
|
import android.support.v4.widget.ExploreByTouchHelper;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
import android.view.accessibility.AccessibilityEvent;
|
import android.view.accessibility.AccessibilityEvent;
|
||||||
import android.widget.RadioButton;
|
import android.widget.RadioButton;
|
||||||
import android.widget.RadioGroup;
|
import android.widget.RadioGroup;
|
||||||
@@ -121,8 +123,12 @@ public class LabeledSeekBar extends SeekBar {
|
|||||||
|
|
||||||
private class LabeledSeekBarExploreByTouchHelper extends ExploreByTouchHelper {
|
private class LabeledSeekBarExploreByTouchHelper extends ExploreByTouchHelper {
|
||||||
|
|
||||||
|
private boolean mIsLayoutRtl;
|
||||||
|
|
||||||
public LabeledSeekBarExploreByTouchHelper(LabeledSeekBar forView) {
|
public LabeledSeekBarExploreByTouchHelper(LabeledSeekBar forView) {
|
||||||
super(forView);
|
super(forView);
|
||||||
|
mIsLayoutRtl = forView.getResources().getConfiguration()
|
||||||
|
.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -192,20 +198,23 @@ public class LabeledSeekBar extends SeekBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getVirtualViewIdIndexFromX(float x) {
|
private int getVirtualViewIdIndexFromX(float x) {
|
||||||
final int posBase = Math.max(0,
|
int posBase = Math.max(0,
|
||||||
((int) x - LabeledSeekBar.this.getPaddingStart()) / getHalfVirtualViewWidth());
|
((int) x - LabeledSeekBar.this.getPaddingStart()) / getHalfVirtualViewWidth());
|
||||||
return (posBase + 1) / 2;
|
posBase = (posBase + 1) / 2;
|
||||||
|
return mIsLayoutRtl ? LabeledSeekBar.this.getMax() - posBase : posBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Rect getBoundsInParentFromVirtualViewId(int virtualViewId) {
|
private Rect getBoundsInParentFromVirtualViewId(int virtualViewId) {
|
||||||
int left = (virtualViewId * 2 - 1) * getHalfVirtualViewWidth()
|
final int updatedVirtualViewId = mIsLayoutRtl
|
||||||
|
? LabeledSeekBar.this.getMax() - virtualViewId : virtualViewId;
|
||||||
|
int left = (updatedVirtualViewId * 2 - 1) * getHalfVirtualViewWidth()
|
||||||
+ LabeledSeekBar.this.getPaddingStart();
|
+ LabeledSeekBar.this.getPaddingStart();
|
||||||
int right = (virtualViewId * 2 + 1) * getHalfVirtualViewWidth()
|
int right = (updatedVirtualViewId * 2 + 1) * getHalfVirtualViewWidth()
|
||||||
+ LabeledSeekBar.this.getPaddingStart();
|
+ LabeledSeekBar.this.getPaddingStart();
|
||||||
|
|
||||||
// Edge case
|
// Edge case
|
||||||
left = virtualViewId == 0 ? 0 : left;
|
left = updatedVirtualViewId == 0 ? 0 : left;
|
||||||
right = virtualViewId == LabeledSeekBar.this.getMax()
|
right = updatedVirtualViewId == LabeledSeekBar.this.getMax()
|
||||||
? LabeledSeekBar.this.getWidth() : right;
|
? LabeledSeekBar.this.getWidth() : right;
|
||||||
|
|
||||||
final Rect r = new Rect();
|
final Rect r = new Rect();
|
||||||
|
Reference in New Issue
Block a user