Udostępnij za pośrednictwem


BaseKeyListener.Backspace(View, IEditable, Keycode, KeyEvent) Method

Definition

Performs the action that happens when you press the KeyEvent#KEYCODE_DEL key in a TextView.

[Android.Runtime.Register("backspace", "(Landroid/view/View;Landroid/text/Editable;ILandroid/view/KeyEvent;)Z", "GetBackspace_Landroid_view_View_Landroid_text_Editable_ILandroid_view_KeyEvent_Handler")]
public virtual bool Backspace (Android.Views.View? view, Android.Text.IEditable? content, Android.Views.Keycode keyCode, Android.Views.KeyEvent? e);
[<Android.Runtime.Register("backspace", "(Landroid/view/View;Landroid/text/Editable;ILandroid/view/KeyEvent;)Z", "GetBackspace_Landroid_view_View_Landroid_text_Editable_ILandroid_view_KeyEvent_Handler")>]
abstract member Backspace : Android.Views.View * Android.Text.IEditable * Android.Views.Keycode * Android.Views.KeyEvent -> bool
override this.Backspace : Android.Views.View * Android.Text.IEditable * Android.Views.Keycode * Android.Views.KeyEvent -> bool

Parameters

view
View
content
IEditable
keyCode
Keycode

Returns

true if anything was deleted; false otherwise.

Attributes

Remarks

Performs the action that happens when you press the KeyEvent#KEYCODE_DEL key in a TextView. If there is a selection, deletes the selection; otherwise, deletes the character before the cursor, if any; ALT+DEL deletes everything on the line the cursor is on.

Java documentation for android.text.method.BaseKeyListener.backspace(android.view.View, android.text.Editable, int, android.view.KeyEvent).

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