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:
@@ -36,7 +36,6 @@ public class MasterSwitchPreference extends TwoTargetPreference {
|
||||
|
||||
private Switch mSwitch;
|
||||
private boolean mChecked;
|
||||
private boolean mMultiLine;
|
||||
|
||||
public MasterSwitchPreference(Context context, AttributeSet attrs,
|
||||
int defStyleAttr, int defStyleRes) {
|
||||
@@ -81,12 +80,6 @@ public class MasterSwitchPreference extends TwoTargetPreference {
|
||||
if (mSwitch != null) {
|
||||
mSwitch.setChecked(mChecked);
|
||||
}
|
||||
if (mMultiLine) {
|
||||
TextView textView = (TextView) holder.findViewById(android.R.id.title);
|
||||
if (textView != null) {
|
||||
textView.setSingleLine(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isChecked() {
|
||||
@@ -106,14 +99,6 @@ public class MasterSwitchPreference extends TwoTargetPreference {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isMultiLine() {
|
||||
return mMultiLine;
|
||||
}
|
||||
|
||||
public void setMultiLine(boolean multiLine) {
|
||||
mMultiLine = multiLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* If admin is not null, disables the switch.
|
||||
* Otherwise, keep it enabled.
|
||||
|
Reference in New Issue
Block a user