Allow settings preference title to span over multiple lines.

- add singleLineTitle=false to SettingsPreference style, so that it will
not confined the title to a single line.
- remove the custom multi line title from DividerPreference and
MasterSwitchPreference.

Change-Id: I5a78d2cd6ac00c4482e252b0789fd2d265bd9adf
Fix: 34886787
Test: manual
This commit is contained in:
Doris Ling
2017-04-11 13:17:38 -07:00
parent f84c8d3480
commit aa805e70ed
6 changed files with 21 additions and 68 deletions

View File

@@ -25,7 +25,6 @@ public class DividerPreference extends Preference {
private Boolean mAllowAbove;
private Boolean mAllowBelow;
private Boolean mMultiLine;
public DividerPreference(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -36,9 +35,6 @@ public class DividerPreference extends Preference {
if (a.hasValue(R.styleable.DividerPreference_allowDividerBelow)) {
mAllowBelow = a.getBoolean(R.styleable.DividerPreference_allowDividerBelow, false);
}
if (a.hasValue(R.styleable.DividerPreference_multiLine)) {
mMultiLine = a.getBoolean(R.styleable.DividerPreference_multiLine, false);
}
}
public DividerPreference(Context context) {
@@ -64,12 +60,5 @@ public class DividerPreference extends Preference {
if (mAllowBelow != null) {
holder.setDividerAllowedBelow(mAllowBelow);
}
if (mMultiLine != null && mMultiLine) {
TextView textView = (TextView)holder.findViewById(android.R.id.title);
if (textView != null) {
textView.setSingleLine(false);
}
}
}
}