From b01383beab9d2d1dc610e51dfeff9da0c5db8302 Mon Sep 17 00:00:00 2001 From: Maurice Lam Date: Tue, 21 Jul 2015 11:36:43 -0700 Subject: [PATCH] [ZenMode] Align text to viewStart in remove dialog Bug: 22274462 Change-Id: I696c4b33c111a61b51e1581fd4a2830fc1844f40 --- .../settings/notification/ZenModeRuleSettingsBase.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/notification/ZenModeRuleSettingsBase.java b/src/com/android/settings/notification/ZenModeRuleSettingsBase.java index 9ba7e92f3c3..0c85eca1ddb 100644 --- a/src/com/android/settings/notification/ZenModeRuleSettingsBase.java +++ b/src/com/android/settings/notification/ZenModeRuleSettingsBase.java @@ -33,7 +33,9 @@ import android.util.Log; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; +import android.view.View; import android.widget.Switch; +import android.widget.TextView; import android.widget.Toast; import com.android.internal.logging.MetricsLogger; @@ -231,7 +233,7 @@ public abstract class ZenModeRuleSettingsBase extends ZenModeSettingsBase } private void showDeleteRuleDialog() { - new AlertDialog.Builder(mContext) + final AlertDialog dialog = new AlertDialog.Builder(mContext) .setMessage(getString(R.string.zen_mode_delete_rule_confirmation, mRule.name)) .setNegativeButton(R.string.cancel, null) .setPositiveButton(R.string.zen_mode_delete_rule_button, new OnClickListener() { @@ -244,6 +246,10 @@ public abstract class ZenModeRuleSettingsBase extends ZenModeSettingsBase } }) .show(); + final View messageView = dialog.findViewById(android.R.id.message); + if (messageView != null) { + messageView.setTextDirection(View.TEXT_DIRECTION_LOCALE); + } } private void toastAndFinish() {