Search in sources :

Example 6 with StatusBar

use of com.android.layoutlib.bridge.bars.StatusBar in project android_frameworks_base by crdroidandroid.

the class Layout method createStatusBar.

/**
     * @param isRtl    whether the current locale is an RTL locale.
     * @param isRtlSupported    whether the applications supports RTL (i.e. has supportsRtl=true
     * in the manifest and targetSdkVersion >= 17.
     */
@NonNull
private StatusBar createStatusBar(BridgeContext context, Density density, boolean isRtl, boolean isRtlSupported, int simulatedPlatformVersion) {
    StatusBar statusBar = new StatusBar(context, density, isRtl, isRtlSupported, simulatedPlatformVersion);
    LayoutParams params = createLayoutParams(MATCH_PARENT, mBuilder.mStatusBarSize);
    if (mBuilder.isNavBarVertical()) {
        params.addRule(START_OF, getId(ID_NAV_BAR));
    }
    statusBar.setLayoutParams(params);
    statusBar.setId(getId(ID_STATUS_BAR));
    return statusBar;
}
Also used : StatusBar(com.android.layoutlib.bridge.bars.StatusBar) NonNull(android.annotation.NonNull)

Aggregations

StatusBar (com.android.layoutlib.bridge.bars.StatusBar)6 NonNull (android.annotation.NonNull)5 Drawable (android.graphics.drawable.Drawable)1 View (android.view.View)1 ViewGroup (android.view.ViewGroup)1 LayoutParams (android.view.ViewGroup.LayoutParams)1 MarginLayoutParams (android.view.ViewGroup.MarginLayoutParams)1 AbsListView (android.widget.AbsListView)1 AdapterView (android.widget.AdapterView)1 ExpandableListView (android.widget.ExpandableListView)1 FrameLayout (android.widget.FrameLayout)1 LinearLayout (android.widget.LinearLayout)1 ListView (android.widget.ListView)1 HardwareConfig (com.android.ide.common.rendering.api.HardwareConfig)1 SessionParams (com.android.ide.common.rendering.api.SessionParams)1 BridgeContext (com.android.layoutlib.bridge.android.BridgeContext)1 FakeActionBar (com.android.layoutlib.bridge.bars.FakeActionBar)1 NavigationBar (com.android.layoutlib.bridge.bars.NavigationBar)1 TitleBar (com.android.layoutlib.bridge.bars.TitleBar)1 XmlPullParserException (org.xmlpull.v1.XmlPullParserException)1