Center apps Preference title when there is no summary am: 3cb8171f4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18426345 Change-Id: I97bc32891465de1a07aa2c6e5f87d00cba91cd54 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -95,10 +95,17 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
void setSummary(CharSequence summary) {
|
||||
mSummary.setText(summary);
|
||||
updateSummaryVisibility();
|
||||
}
|
||||
|
||||
void setSummary(@StringRes int summary) {
|
||||
mSummary.setText(summary);
|
||||
updateSummaryVisibility();
|
||||
}
|
||||
|
||||
private void updateSummaryVisibility() {
|
||||
// Hide an empty summary and then title will be vertically centered.
|
||||
mSummary.setVisibility(TextUtils.isEmpty(mSummary.getText()) ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
void setEnabled(boolean isEnabled) {
|
||||
|
Reference in New Issue
Block a user