Compartir a través de


Window.SetNavigationBarColor(Color) Method

Definition

Sets the color of the navigation bar to .

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

Parameters

color
Color
Attributes

Remarks

Sets the color of the navigation bar to .

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_NAVIGATION must not be set.

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

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

Java documentation for android.view.Window.setNavigationBarColor(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