Freigeben über


Switch.SetTrackIcon(Icon) Method

Definition

Set the drawable used for the track that the switch slides within to the specified Icon.

[Android.Runtime.Register("setTrackIcon", "(Landroid/graphics/drawable/Icon;)V", "GetSetTrackIcon_Landroid_graphics_drawable_Icon_Handler", ApiSince=31)]
public virtual void SetTrackIcon (Android.Graphics.Drawables.Icon? icon);
[<Android.Runtime.Register("setTrackIcon", "(Landroid/graphics/drawable/Icon;)V", "GetSetTrackIcon_Landroid_graphics_drawable_Icon_Handler", ApiSince=31)>]
abstract member SetTrackIcon : Android.Graphics.Drawables.Icon -> unit
override this.SetTrackIcon : Android.Graphics.Drawables.Icon -> unit

Parameters

icon
Icon

an Icon holding the desired track, or null to clear the track

Attributes

Remarks

Set the drawable used for the track that the switch slides within to the specified Icon.

Java documentation for android.widget.Switch.setTrackIcon(android.graphics.drawable.Icon).

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