Merge "Accessibility settings - divider should be hidden"
This commit is contained in:
committed by
Android (Google) Code Review
commit
4b3877598c
@@ -61,16 +61,9 @@ public class SettingsCheckBoxPreference extends CheckBoxPreference {
|
|||||||
@Override
|
@Override
|
||||||
protected void onBindView(View view) {
|
protected void onBindView(View view) {
|
||||||
super.onBindView(view);
|
super.onBindView(view);
|
||||||
|
|
||||||
ImageView settingsButton = (ImageView) view.findViewById(R.id.settings_button);
|
ImageView settingsButton = (ImageView) view.findViewById(R.id.settings_button);
|
||||||
if (settingsButton == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (mSettingsIntent != null) {
|
if (mSettingsIntent != null) {
|
||||||
CheckBox checkbox = (CheckBox) view.findViewById(com.android.internal.R.id.checkbox);
|
CheckBox checkbox = (CheckBox) view.findViewById(com.android.internal.R.id.checkbox);
|
||||||
if (checkbox == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (checkbox.isChecked()) {
|
if (checkbox.isChecked()) {
|
||||||
settingsButton.setOnClickListener(new OnClickListener() {
|
settingsButton.setOnClickListener(new OnClickListener() {
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
@@ -86,6 +79,7 @@ public class SettingsCheckBoxPreference extends CheckBoxPreference {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
settingsButton.setVisibility(View.GONE);
|
settingsButton.setVisibility(View.GONE);
|
||||||
|
view.findViewById(R.id.divider).setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user