Loading core/java/com/android/internal/app/AlertController.java +7 −7 Original line number Diff line number Diff line Loading @@ -466,16 +466,16 @@ public class AlertController { } private void setupView() { LinearLayout contentPanel = (LinearLayout) mWindow.findViewById(R.id.contentPanel); final LinearLayout contentPanel = (LinearLayout) mWindow.findViewById(R.id.contentPanel); setupContent(contentPanel); boolean hasButtons = setupButtons(); final boolean hasButtons = setupButtons(); LinearLayout topPanel = (LinearLayout) mWindow.findViewById(R.id.topPanel); TypedArray a = mContext.obtainStyledAttributes( null, com.android.internal.R.styleable.AlertDialog, com.android.internal.R.attr.alertDialogStyle, 0); boolean hasTitle = setupTitle(topPanel); final LinearLayout topPanel = (LinearLayout) mWindow.findViewById(R.id.topPanel); final TypedArray a = mContext.obtainStyledAttributes( null, R.styleable.AlertDialog, R.attr.alertDialogStyle, 0); final boolean hasTitle = setupTitle(topPanel); View buttonPanel = mWindow.findViewById(R.id.buttonPanel); final View buttonPanel = mWindow.findViewById(R.id.buttonPanel); if (!hasButtons) { buttonPanel.setVisibility(View.GONE); mWindow.setCloseOnTouchOutsideIfNotSet(true); Loading core/res/res/layout/alert_dialog_material.xml +9 −3 Original line number Diff line number Diff line Loading @@ -39,14 +39,15 @@ android:gravity="center_vertical|start" android:paddingStart="16dip" android:paddingEnd="16dip" android:paddingTop="16dip"> android:paddingTop="16dip" android:paddingBottom="8dip"> <ImageView android:id="@+id/icon" android:layout_width="32dip" android:layout_height="32dip" android:layout_marginEnd="8dip" android:scaleType="fitCenter" android:src="@null" /> <TextView android:id="@+id/alertTitle" <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle" style="?attr/windowTitleStyle" android:singleLine="true" android:ellipsize="end" Loading Loading @@ -96,7 +97,7 @@ android:padding="16dip"> <LinearLayout style="?attr/buttonBarStyle" android:layout_width="wrap_content" android:layout_width="match_parent" android:layout_height="wrap_content" android:layoutDirection="locale"> <Button android:id="@+id/button3" Loading @@ -105,6 +106,11 @@ android:layout_height="wrap_content" android:maxLines="2" android:minHeight="@dimen/alert_dialog_button_bar_height" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" android:visibility="invisible" /> <Button android:id="@+id/button2" style="?attr/buttonBarButtonStyle" android:layout_width="wrap_content" Loading Loading
core/java/com/android/internal/app/AlertController.java +7 −7 Original line number Diff line number Diff line Loading @@ -466,16 +466,16 @@ public class AlertController { } private void setupView() { LinearLayout contentPanel = (LinearLayout) mWindow.findViewById(R.id.contentPanel); final LinearLayout contentPanel = (LinearLayout) mWindow.findViewById(R.id.contentPanel); setupContent(contentPanel); boolean hasButtons = setupButtons(); final boolean hasButtons = setupButtons(); LinearLayout topPanel = (LinearLayout) mWindow.findViewById(R.id.topPanel); TypedArray a = mContext.obtainStyledAttributes( null, com.android.internal.R.styleable.AlertDialog, com.android.internal.R.attr.alertDialogStyle, 0); boolean hasTitle = setupTitle(topPanel); final LinearLayout topPanel = (LinearLayout) mWindow.findViewById(R.id.topPanel); final TypedArray a = mContext.obtainStyledAttributes( null, R.styleable.AlertDialog, R.attr.alertDialogStyle, 0); final boolean hasTitle = setupTitle(topPanel); View buttonPanel = mWindow.findViewById(R.id.buttonPanel); final View buttonPanel = mWindow.findViewById(R.id.buttonPanel); if (!hasButtons) { buttonPanel.setVisibility(View.GONE); mWindow.setCloseOnTouchOutsideIfNotSet(true); Loading
core/res/res/layout/alert_dialog_material.xml +9 −3 Original line number Diff line number Diff line Loading @@ -39,14 +39,15 @@ android:gravity="center_vertical|start" android:paddingStart="16dip" android:paddingEnd="16dip" android:paddingTop="16dip"> android:paddingTop="16dip" android:paddingBottom="8dip"> <ImageView android:id="@+id/icon" android:layout_width="32dip" android:layout_height="32dip" android:layout_marginEnd="8dip" android:scaleType="fitCenter" android:src="@null" /> <TextView android:id="@+id/alertTitle" <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle" style="?attr/windowTitleStyle" android:singleLine="true" android:ellipsize="end" Loading Loading @@ -96,7 +97,7 @@ android:padding="16dip"> <LinearLayout style="?attr/buttonBarStyle" android:layout_width="wrap_content" android:layout_width="match_parent" android:layout_height="wrap_content" android:layoutDirection="locale"> <Button android:id="@+id/button3" Loading @@ -105,6 +106,11 @@ android:layout_height="wrap_content" android:maxLines="2" android:minHeight="@dimen/alert_dialog_button_bar_height" /> <Space android:layout_width="0dp" android:layout_height="0dp" android:layout_weight="1" android:visibility="invisible" /> <Button android:id="@+id/button2" style="?attr/buttonBarButtonStyle" android:layout_width="wrap_content" Loading