BaseInputConnection.CommitContent Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to deliver content to the target view.
[Android.Runtime.Register("commitContent", "(Landroid/view/inputmethod/InputContentInfo;ILandroid/os/Bundle;)Z", "GetCommitContent_Landroid_view_inputmethod_InputContentInfo_ILandroid_os_Bundle_Handler", ApiSince=25)]
public virtual bool CommitContent(Android.Views.InputMethods.InputContentInfo? inputContentInfo, Android.Views.InputMethods.InputContentFlags flags, Android.OS.Bundle? opts);
[<Android.Runtime.Register("commitContent", "(Landroid/view/inputmethod/InputContentInfo;ILandroid/os/Bundle;)Z", "GetCommitContent_Landroid_view_inputmethod_InputContentInfo_ILandroid_os_Bundle_Handler", ApiSince=25)>]
abstract member CommitContent : Android.Views.InputMethods.InputContentInfo * Android.Views.InputMethods.InputContentFlags * Android.OS.Bundle -> bool
override this.CommitContent : Android.Views.InputMethods.InputContentInfo * Android.Views.InputMethods.InputContentFlags * Android.OS.Bundle -> bool
Parameters
- inputContentInfo
- InputContentInfo
Content to be inserted. This value cannot be null.
- flags
- InputContentFlags
InputConnection.INPUT_CONTENT_GRANT_READ_URI_PERMISSION if the content provider allows grantUriPermissions or 0 if the application does not need to call InputContentInfo.requestPermission().
- opts
- Bundle
optional bundle data. This can be null.
Returns
On Android 12 and later, the default implementation returns true if the target view consumes all the content. It returns false if content remains or a requested permission cannot be obtained. On Android 11 and earlier, the default implementation returns false.
Implements
- Attributes
Remarks
On Android 12 and later, the default implementation calls View#performReceiveContent if the target view is configured to receive content and any requested URI permission is granted. On Android 11 and earlier, it does nothing.
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.