From 34bc05cceed1e22f7ce50e404a73b82dabcf8d86 Mon Sep 17 00:00:00 2001 From: Beverly Date: Fri, 19 Apr 2019 13:21:31 -0400 Subject: [PATCH] Allow up two lines of text on dnd restrict notif Test: manual Bug: 130848971 Change-Id: I1d32963f0e291d42c8b98ba8ca39eba749a26989 --- .../settings/widget/DisabledCheckBoxPreference.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/android/settings/widget/DisabledCheckBoxPreference.java b/src/com/android/settings/widget/DisabledCheckBoxPreference.java index be6deb3a0be..15c17dc88dd 100644 --- a/src/com/android/settings/widget/DisabledCheckBoxPreference.java +++ b/src/com/android/settings/widget/DisabledCheckBoxPreference.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.view.View; +import android.widget.TextView; import androidx.preference.CheckBoxPreference; import androidx.preference.PreferenceViewHolder; @@ -89,6 +90,12 @@ public class DisabledCheckBoxPreference extends CheckBoxPreference { mCheckBox = holder.findViewById(android.R.id.checkbox); enableCheckbox(mEnabledCheckBox); + + TextView title = (TextView) holder.findViewById(android.R.id.title); + if (title != null) { + title.setSingleLine(false); + title.setMaxLines(2); + } } @Override