Merge "Show "Doesn't support work profiles" text in Settings for launchers not supporting work profiles." into pi-dev am: 1bc98edc15

am: 2465019035

Change-Id: Ia7f4d752de8ceabac2379975b235ba21e046f415
This commit is contained in:
Antoan Angelov
2018-03-20 23:22:40 +00:00
committed by android-build-merger
2 changed files with 91 additions and 0 deletions

View File

@@ -20,7 +20,9 @@ import android.content.Context;
import android.support.v4.content.res.TypedArrayUtils;
import android.support.v7.preference.CheckBoxPreference;
import android.support.v7.preference.PreferenceViewHolder;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import com.android.settings.R;
@@ -72,6 +74,12 @@ public class RadioButtonPreference extends CheckBoxPreference {
public void onBindViewHolder(PreferenceViewHolder view) {
super.onBindViewHolder(view);
View summaryContainer = view.findViewById(R.id.summary_container);
if (summaryContainer != null) {
summaryContainer.setVisibility(
TextUtils.isEmpty(getSummary()) ? View.GONE : View.VISIBLE);
}
TextView title = (TextView) view.findViewById(android.R.id.title);
if (title != null) {
title.setSingleLine(false);