Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a86e3d70 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Check if singleLineTitle attribute is set for the preference." into oc-dev

parents bd9ee9f1 ce580466
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ public class Preference implements Comparable<Preference> {
    private boolean mDependencyMet = true;
    private boolean mParentDependencyMet = true;
    private boolean mRecycleEnabled = true;
    private boolean mHasSingleLineTitleAttr;
    private boolean mSingleLineTitle = true;
    private boolean mIconSpaceReserved;

@@ -303,6 +304,7 @@ public class Preference implements Comparable<Preference> {

                case com.android.internal.R.styleable.Preference_singleLineTitle:
                    mSingleLineTitle = a.getBoolean(attr, mSingleLineTitle);
                    mHasSingleLineTitleAttr = true;
                    break;

                case com.android.internal.R.styleable.Preference_iconSpaceReserved:
@@ -609,7 +611,9 @@ public class Preference implements Comparable<Preference> {
            if (!TextUtils.isEmpty(title)) {
                titleView.setText(title);
                titleView.setVisibility(View.VISIBLE);
                if (mHasSingleLineTitleAttr) {
                    titleView.setSingleLine(mSingleLineTitle);
                }
            } else {
                titleView.setVisibility(View.GONE);
            }