Compartilhar via


Keyboard.Key Class

Definition

Class for describing the position and characteristics of a single key in the keyboard.

[Android.Runtime.Register("android/inputmethodservice/Keyboard$Key", DoNotGenerateAcw=true)]
public class Keyboard.Key : Java.Lang.Object
[<Android.Runtime.Register("android/inputmethodservice/Keyboard$Key", DoNotGenerateAcw=true)>]
type Keyboard.Key = class
    inherit Object
Inheritance
Keyboard.Key
Attributes

Remarks

Class for describing the position and characteristics of a single key in the keyboard.

Java documentation for android.inputmethodservice.Keyboard.Key.

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.

Constructors

Keyboard.Key(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Keyboard.Key(Keyboard+Row)

Create an empty key with no attributes.

Keyboard.Key(Resources, Keyboard+Row, Int32, Int32, XmlReader)

Create a key with the given top-left coordinate and extract its attributes from the XML parser.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Codes

All the key codes (unicode or custom code) that this key could generate, zero'th being the most important.

EdgeFlags

Flags that specify the anchoring to edges of the keyboard for detecting touch events that are just out of the boundary of the key.

Gap

The horizontal gap before this key

Handle

The handle to the underlying Android instance.

(Inherited from Object)
Height

Height of the key, not including the gap

Icon

Icon to display instead of a label.

IconPreview

Preview version of the icon, for the preview popup

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
Label

Label to display

Modifier

Whether this is a modifier key, such as Shift or Alt

On

If this is a sticky key, is it on?

PeerReference (Inherited from Object)
PopupCharacters

Popup characters

PopupResId

If this key pops up a mini keyboard, this is the resource id for the XML layout for that keyboard.

Pressed

The current pressed state of this key

Repeatable

Whether this key repeats itself when held down

Sticky

Whether this key is sticky, i.

Text

Text to output when pressed.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Width

Width of the key, not including the gap

X

X coordinate of the key in the keyboard layout

Y

Y coordinate of the key in the keyboard layout

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetCurrentDrawableState()

Returns the drawable state for the key, based on the current state and type of the key.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
IsInside(Int32, Int32)

Detects if a point falls inside this key.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
OnPressed()

Informs the key that it has been pressed, in case it needs to change its appearance or state.

OnReleased(Boolean)

Changes the pressed state of the key.

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SquaredDistanceFrom(Int32, Int32)

Returns the square of the distance between the center of the key and the given point.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to