Loading core/java/com/android/internal/app/AlertController.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -618,7 +618,7 @@ public class AlertController { } } } } private void setupTitle(ViewGroup topPanel) { protected void setupTitle(ViewGroup topPanel) { if (mCustomTitleView != null && mShowTitle) { if (mCustomTitleView != null && mShowTitle) { // Add the custom title view directly to the topPanel layout // Add the custom title view directly to the topPanel layout final LayoutParams lp = new LayoutParams( final LayoutParams lp = new LayoutParams( Loading Loading @@ -701,7 +701,7 @@ public class AlertController { } } } } private void setupButtons(ViewGroup buttonPanel) { protected void setupButtons(ViewGroup buttonPanel) { int BIT_BUTTON_POSITIVE = 1; int BIT_BUTTON_POSITIVE = 1; int BIT_BUTTON_NEGATIVE = 2; int BIT_BUTTON_NEGATIVE = 2; int BIT_BUTTON_NEUTRAL = 4; int BIT_BUTTON_NEUTRAL = 4; Loading core/java/com/android/internal/app/MicroAlertController.java +16 −0 Original line number Original line Diff line number Diff line Loading @@ -82,4 +82,20 @@ public class MicroAlertController extends AlertController { } } } } } } @Override protected void setupTitle(ViewGroup topPanel) { super.setupTitle(topPanel); if (topPanel.getVisibility() == View.GONE) { topPanel.setVisibility(View.INVISIBLE); } } @Override protected void setupButtons(ViewGroup buttonPanel) { super.setupButtons(buttonPanel); if (buttonPanel.getVisibility() == View.GONE) { buttonPanel.setVisibility(View.INVISIBLE); } } } } core/res/res/layout-watch/alert_dialog_material.xml +5 −11 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ android:layout_height="match_parent"> android:layout_height="match_parent"> <ScrollView <ScrollView android:id="@+id/scrollView" android:id="@+id/scrollView" android:fillViewport="true" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="match_parent"> android:layout_height="match_parent"> <LinearLayout <LinearLayout Loading @@ -33,7 +34,8 @@ android:paddingRight="?dialogPreferredPadding" android:paddingRight="?dialogPreferredPadding" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:id="@+id/topPanel"> android:id="@+id/topPanel" android:minHeight="@dimen/dialog_list_padding_top_no_title"> <include android:id="@+id/title_template" <include android:id="@+id/title_template" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" Loading Loading @@ -68,41 +70,33 @@ <!-- Button Panel --> <!-- Button Panel --> <FrameLayout <FrameLayout android:id="@+id/buttonPanel" android:id="@+id/buttonPanel" android:minHeight="@dimen/dialog_list_padding_bottom_no_buttons" android:layout_weight="1" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content"> android:layout_height="wrap_content"> <LinearLayout <LinearLayout android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:divider="?android:attr/dividerHorizontal" android:showDividers="beginning" android:dividerPadding="0dip" android:orientation="vertical" android:orientation="vertical" android:minHeight="@dimen/alert_dialog_button_bar_height" android:minHeight="@dimen/alert_dialog_button_bar_height" android:paddingBottom="?dialogPreferredPadding" android:paddingBottom="?dialogPreferredPadding" style="?android:attr/buttonBarStyle" style="?android:attr/buttonBarStyle" android:layoutDirection="locale" android:measureWithLargestChild="true"> android:measureWithLargestChild="true"> <Button android:id="@+id/button1" <Button android:id="@+id/button1" android:layout_gravity="start" android:layout_gravity="start" android:layout_weight="1" android:layout_weight="1" android:layout_marginLeft="?dialogPreferredPadding" android:layout_marginRight="?dialogPreferredPadding" style="?android:attr/buttonBarButtonStyle" style="?android:attr/buttonBarButtonStyle" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" /> android:layout_height="wrap_content" /> <Button android:id="@+id/button3" <Button android:id="@+id/button3" android:layout_gravity="start" android:layout_gravity="start" android:layout_weight="1" android:layout_weight="1" android:layout_marginLeft="?dialogPreferredPadding" android:layout_marginRight="?dialogPreferredPadding" style="?android:attr/buttonBarButtonStyle" style="?android:attr/buttonBarButtonStyle" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" /> android:layout_height="wrap_content" /> <Button android:id="@+id/button2" <Button android:id="@+id/button2" android:layout_gravity="start" android:layout_gravity="start" android:layout_weight="1" android:layout_weight="1" android:layout_marginLeft="?dialogPreferredPadding" android:layout_marginRight="?dialogPreferredPadding" style="?android:attr/buttonBarButtonStyle" style="?android:attr/buttonBarButtonStyle" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" /> android:layout_height="wrap_content" /> Loading core/res/res/values-notround-watch/dimens_material.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -20,4 +20,7 @@ <dimen name="list_item_padding_horizontal_material">16dp</dimen> <dimen name="list_item_padding_horizontal_material">16dp</dimen> <dimen name="list_item_padding_start_material">16dp</dimen> <dimen name="list_item_padding_start_material">16dp</dimen> <dimen name="list_item_padding_end_material">16dp</dimen> <dimen name="list_item_padding_end_material">16dp</dimen> <dimen name="dialog_list_padding_top_no_title">8dp</dimen> <dimen name="dialog_list_padding_bottom_no_buttons">8dp</dimen> </resources> </resources> core/res/res/values-round-watch/dimens_material.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -20,4 +20,7 @@ <dimen name="list_item_padding_horizontal_material">@dimen/screen_percentage_15</dimen> <dimen name="list_item_padding_horizontal_material">@dimen/screen_percentage_15</dimen> <dimen name="list_item_padding_start_material">@dimen/screen_percentage_15</dimen> <dimen name="list_item_padding_start_material">@dimen/screen_percentage_15</dimen> <dimen name="list_item_padding_end_material">@dimen/screen_percentage_10</dimen> <dimen name="list_item_padding_end_material">@dimen/screen_percentage_10</dimen> <dimen name="dialog_list_padding_top_no_title">@dimen/screen_percentage_15</dimen> <dimen name="dialog_list_padding_bottom_no_buttons">@dimen/screen_percentage_15</dimen> </resources> </resources> Loading
core/java/com/android/internal/app/AlertController.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -618,7 +618,7 @@ public class AlertController { } } } } private void setupTitle(ViewGroup topPanel) { protected void setupTitle(ViewGroup topPanel) { if (mCustomTitleView != null && mShowTitle) { if (mCustomTitleView != null && mShowTitle) { // Add the custom title view directly to the topPanel layout // Add the custom title view directly to the topPanel layout final LayoutParams lp = new LayoutParams( final LayoutParams lp = new LayoutParams( Loading Loading @@ -701,7 +701,7 @@ public class AlertController { } } } } private void setupButtons(ViewGroup buttonPanel) { protected void setupButtons(ViewGroup buttonPanel) { int BIT_BUTTON_POSITIVE = 1; int BIT_BUTTON_POSITIVE = 1; int BIT_BUTTON_NEGATIVE = 2; int BIT_BUTTON_NEGATIVE = 2; int BIT_BUTTON_NEUTRAL = 4; int BIT_BUTTON_NEUTRAL = 4; Loading
core/java/com/android/internal/app/MicroAlertController.java +16 −0 Original line number Original line Diff line number Diff line Loading @@ -82,4 +82,20 @@ public class MicroAlertController extends AlertController { } } } } } } @Override protected void setupTitle(ViewGroup topPanel) { super.setupTitle(topPanel); if (topPanel.getVisibility() == View.GONE) { topPanel.setVisibility(View.INVISIBLE); } } @Override protected void setupButtons(ViewGroup buttonPanel) { super.setupButtons(buttonPanel); if (buttonPanel.getVisibility() == View.GONE) { buttonPanel.setVisibility(View.INVISIBLE); } } } }
core/res/res/layout-watch/alert_dialog_material.xml +5 −11 Original line number Original line Diff line number Diff line Loading @@ -21,6 +21,7 @@ android:layout_height="match_parent"> android:layout_height="match_parent"> <ScrollView <ScrollView android:id="@+id/scrollView" android:id="@+id/scrollView" android:fillViewport="true" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="match_parent"> android:layout_height="match_parent"> <LinearLayout <LinearLayout Loading @@ -33,7 +34,8 @@ android:paddingRight="?dialogPreferredPadding" android:paddingRight="?dialogPreferredPadding" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:id="@+id/topPanel"> android:id="@+id/topPanel" android:minHeight="@dimen/dialog_list_padding_top_no_title"> <include android:id="@+id/title_template" <include android:id="@+id/title_template" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" Loading Loading @@ -68,41 +70,33 @@ <!-- Button Panel --> <!-- Button Panel --> <FrameLayout <FrameLayout android:id="@+id/buttonPanel" android:id="@+id/buttonPanel" android:minHeight="@dimen/dialog_list_padding_bottom_no_buttons" android:layout_weight="1" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content"> android:layout_height="wrap_content"> <LinearLayout <LinearLayout android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:divider="?android:attr/dividerHorizontal" android:showDividers="beginning" android:dividerPadding="0dip" android:orientation="vertical" android:orientation="vertical" android:minHeight="@dimen/alert_dialog_button_bar_height" android:minHeight="@dimen/alert_dialog_button_bar_height" android:paddingBottom="?dialogPreferredPadding" android:paddingBottom="?dialogPreferredPadding" style="?android:attr/buttonBarStyle" style="?android:attr/buttonBarStyle" android:layoutDirection="locale" android:measureWithLargestChild="true"> android:measureWithLargestChild="true"> <Button android:id="@+id/button1" <Button android:id="@+id/button1" android:layout_gravity="start" android:layout_gravity="start" android:layout_weight="1" android:layout_weight="1" android:layout_marginLeft="?dialogPreferredPadding" android:layout_marginRight="?dialogPreferredPadding" style="?android:attr/buttonBarButtonStyle" style="?android:attr/buttonBarButtonStyle" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" /> android:layout_height="wrap_content" /> <Button android:id="@+id/button3" <Button android:id="@+id/button3" android:layout_gravity="start" android:layout_gravity="start" android:layout_weight="1" android:layout_weight="1" android:layout_marginLeft="?dialogPreferredPadding" android:layout_marginRight="?dialogPreferredPadding" style="?android:attr/buttonBarButtonStyle" style="?android:attr/buttonBarButtonStyle" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" /> android:layout_height="wrap_content" /> <Button android:id="@+id/button2" <Button android:id="@+id/button2" android:layout_gravity="start" android:layout_gravity="start" android:layout_weight="1" android:layout_weight="1" android:layout_marginLeft="?dialogPreferredPadding" android:layout_marginRight="?dialogPreferredPadding" style="?android:attr/buttonBarButtonStyle" style="?android:attr/buttonBarButtonStyle" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" /> android:layout_height="wrap_content" /> Loading
core/res/res/values-notround-watch/dimens_material.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -20,4 +20,7 @@ <dimen name="list_item_padding_horizontal_material">16dp</dimen> <dimen name="list_item_padding_horizontal_material">16dp</dimen> <dimen name="list_item_padding_start_material">16dp</dimen> <dimen name="list_item_padding_start_material">16dp</dimen> <dimen name="list_item_padding_end_material">16dp</dimen> <dimen name="list_item_padding_end_material">16dp</dimen> <dimen name="dialog_list_padding_top_no_title">8dp</dimen> <dimen name="dialog_list_padding_bottom_no_buttons">8dp</dimen> </resources> </resources>
core/res/res/values-round-watch/dimens_material.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -20,4 +20,7 @@ <dimen name="list_item_padding_horizontal_material">@dimen/screen_percentage_15</dimen> <dimen name="list_item_padding_horizontal_material">@dimen/screen_percentage_15</dimen> <dimen name="list_item_padding_start_material">@dimen/screen_percentage_15</dimen> <dimen name="list_item_padding_start_material">@dimen/screen_percentage_15</dimen> <dimen name="list_item_padding_end_material">@dimen/screen_percentage_10</dimen> <dimen name="list_item_padding_end_material">@dimen/screen_percentage_10</dimen> <dimen name="dialog_list_padding_top_no_title">@dimen/screen_percentage_15</dimen> <dimen name="dialog_list_padding_bottom_no_buttons">@dimen/screen_percentage_15</dimen> </resources> </resources>