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
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user