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

Commit dc337474 authored by jackqdyulei's avatar jackqdyulei
Browse files

Add title support for SlicePreference

Bug: 120803703
Test: Manual
Change-Id: Icc529515a82430aa2cab869b9c85c855e47798ce
parent b940fc3d
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -33,12 +33,17 @@ public class SlicePreference extends LayoutPreference {

    public SlicePreference(Context context, AttributeSet attrs) {
        super(context, attrs, R.attr.slicePreferenceStyle);
        mSliceView = findViewById(R.id.slice_view);
        init();
    }

    public SlicePreference(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, R.attr.slicePreferenceStyle);
        super(context, attrs, defStyleAttr);
        init();
    }

    private void init() {
        mSliceView = findViewById(R.id.slice_view);
        mSliceView.showTitleItems(true);
    }

    public void onSliceUpdated(Slice slice) {