Udostępnij za pośrednictwem


View.GenerateViewId Method

Definition

Generate a value suitable for use in #setId(int).

[Android.Runtime.Register("generateViewId", "()I", "")]
public static int GenerateViewId ();
[<Android.Runtime.Register("generateViewId", "()I", "")>]
static member GenerateViewId : unit -> int

Returns

a generated ID value

Attributes

Remarks

Generate a value suitable for use in #setId(int). This value will not collide with ID values generated at build time by aapt for R.id.

Java documentation for android.view.View.generateViewId().

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