Aracılığıyla paylaş


Toolbar.NavigationIcon Property

Definition

Return the current drawable used as the navigation icon. -or- Set the icon to use for the toolbar's navigation button.

public virtual Android.Graphics.Drawables.Drawable? NavigationIcon { [Android.Runtime.Register("getNavigationIcon", "()Landroid/graphics/drawable/Drawable;", "GetGetNavigationIconHandler")] get; [Android.Runtime.Register("setNavigationIcon", "(Landroid/graphics/drawable/Drawable;)V", "GetSetNavigationIcon_Landroid_graphics_drawable_Drawable_Handler")] set; }
[<get: Android.Runtime.Register("getNavigationIcon", "()Landroid/graphics/drawable/Drawable;", "GetGetNavigationIconHandler")>]
[<set: Android.Runtime.Register("setNavigationIcon", "(Landroid/graphics/drawable/Drawable;)V", "GetSetNavigationIcon_Landroid_graphics_drawable_Drawable_Handler")>]
member this.NavigationIcon : Android.Graphics.Drawables.Drawable with get, set

Property Value

The navigation icon drawable

Attributes

Remarks

Property getter documentation:

Return the current drawable used as the navigation icon.

Java documentation for android.widget.Toolbar.getNavigationIcon().

Property setter documentation:

Set the icon to use for the toolbar's navigation button.

The navigation button appears at the start of the toolbar if present. Setting an icon will make the navigation button visible.

If you use a navigation icon you should also set a description for its action using #setNavigationContentDescription(int). This is used for accessibility and tooltips.

Java documentation for android.widget.Toolbar.setNavigationIcon(android.graphics.drawable.Drawable).

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