Aracılığıyla paylaş


Window.SetStatusBarColor(Color) Method

Definition

Sets the color of the status bar to color.

[Android.Runtime.Register("setStatusBarColor", "(I)V", "GetSetStatusBarColor_IHandler")]
public abstract void SetStatusBarColor (Android.Graphics.Color color);
[<Android.Runtime.Register("setStatusBarColor", "(I)V", "GetSetStatusBarColor_IHandler")>]
abstract member SetStatusBarColor : Android.Graphics.Color -> unit

Parameters

color
Color
Attributes

Remarks

Sets the color of the status bar to color.

For this to take effect, the window must be drawing the system bar backgrounds with android.view.WindowManager.LayoutParams#FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS and android.view.WindowManager.LayoutParams#FLAG_TRANSLUCENT_STATUS must not be set.

If color is not opaque, consider setting android.view.View#SYSTEM_UI_FLAG_LAYOUT_STABLE and android.view.View#SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN.

The transitionName for the view background will be "android:status:background".

Java documentation for android.view.Window.setStatusBarColor(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to