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

Commit 8da724a8 authored by Fan Zhang's avatar Fan Zhang
Browse files

Put divider back when IA is turned off.

Bug: 32231177
Test: manual
Change-Id: I657e0bb3b8721c494cd1a6272b370b54ae5063ec
parent 58b9b141
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -267,7 +267,9 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        final View view = super.onCreateView(inflater, container, savedInstanceState);
        if (mDashboardFeatureProvider.isEnabled()) {
            getListView().addItemDecoration(mDividerDecoration);
        }
        return view;
    }

@@ -284,10 +286,14 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment

    @Override
    public void setDivider(Drawable divider) {
        if (mDashboardFeatureProvider.isEnabled()) {
            // Intercept divider and set it transparent so system divider decoration is disabled.
            // We will use our decoration to draw divider more intelligently.
            mDividerDecoration.setDivider(divider);
            super.setDivider(new ColorDrawable(Color.TRANSPARENT));
        } else {
            super.setDivider(divider);
        }
    }

    /**