Merge "Fix additional summary of RestrictedSwitchPreference." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
205d10bb13
@@ -94,9 +94,9 @@ public class RestrictedSwitchPreference extends SwitchPreference {
|
|||||||
additionalSummaryView.setText(
|
additionalSummaryView.setText(
|
||||||
isChecked() ? R.string.enabled_by_admin : R.string.disabled_by_admin);
|
isChecked() ? R.string.enabled_by_admin : R.string.disabled_by_admin);
|
||||||
additionalSummaryView.setVisibility(View.VISIBLE);
|
additionalSummaryView.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
additionalSummaryView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
additionalSummaryView.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final TextView summaryView = (TextView) holder.findViewById(android.R.id.summary);
|
final TextView summaryView = (TextView) holder.findViewById(android.R.id.summary);
|
||||||
@@ -106,9 +106,9 @@ public class RestrictedSwitchPreference extends SwitchPreference {
|
|||||||
isChecked() ? R.string.enabled_by_admin : R.string.disabled_by_admin);
|
isChecked() ? R.string.enabled_by_admin : R.string.disabled_by_admin);
|
||||||
summaryView.setVisibility(View.VISIBLE);
|
summaryView.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
// No need to change the visibility to GONE in the else case here since Preference
|
||||||
|
// class would have already changed it if there is no summary to display.
|
||||||
}
|
}
|
||||||
// No need to change the visibility to GONE in the else case here since Preference class
|
|
||||||
// would have already changed it if there is no summary to display.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user