use of com.android.layoutlib.bridge.bars.TitleBar in project android_frameworks_base by crdroidandroid.
the class Layout method createTitleBar.
@NonNull
private TitleBar createTitleBar(BridgeContext context, String title, int simulatedPlatformVersion) {
TitleBar titleBar = new TitleBar(context, title, simulatedPlatformVersion);
LayoutParams params = createLayoutParams(MATCH_PARENT, mBuilder.mTitleBarSize);
if (mBuilder.hasStatusBar() && mBuilder.solidBars()) {
params.addRule(BELOW, getId(ID_STATUS_BAR));
}
if (mBuilder.isNavBarVertical() && mBuilder.solidBars()) {
params.addRule(START_OF, getId(ID_NAV_BAR));
}
titleBar.setLayoutParams(params);
titleBar.setId(getId(ID_TITLE_BAR));
return titleBar;
}
Aggregations