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

Commit db5ca4ee authored by Mill Chen's avatar Mill Chen
Browse files

Prevent app bar title from drawing twice

Sometimes we could see a flick problem with app bar title. It appears to
draw the app bar title twice. This CL is to prevent app bar title from
rendering twice.

Bug: 182232144
Test: robotests and visual verified
1) Open Settings app
2) Click on any entrypoint
3) Observe and see if there's a flick problem on app bar title

Change-Id: I9f5b7cdd163f20dd7f85cf2f83b9ef01a473dd3c
parent 50527b1f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -184,17 +184,19 @@ public class SettingsBaseActivity extends FragmentActivity {
    public void setTitle(CharSequence title) {
        if (mCollapsingToolbarLayout != null) {
            mCollapsingToolbarLayout.setTitle(title);
        }
        } else {
            super.setTitle(title);
        }
    }

    @Override
    public void setTitle(int titleId) {
        if (mCollapsingToolbarLayout != null) {
            mCollapsingToolbarLayout.setTitle(getText(titleId));
        }
        } else {
            super.setTitle(titleId);
        }
    }

    /**
     * SubSetting page should show a toolbar by default. If the page wouldn't show a toolbar,