Share via


View.SetAllowedHandwritingDelegatePackage(String) Method

Definition

Specifies that this view may act as a handwriting initiation delegator for a delegate editor view from the specified package.

[Android.Runtime.Register("setAllowedHandwritingDelegatePackage", "(Ljava/lang/String;)V", "GetSetAllowedHandwritingDelegatePackage_Ljava_lang_String_Handler", ApiSince=34)]
public virtual void SetAllowedHandwritingDelegatePackage (string? allowedPackageName);
[<Android.Runtime.Register("setAllowedHandwritingDelegatePackage", "(Ljava/lang/String;)V", "GetSetAllowedHandwritingDelegatePackage_Ljava_lang_String_Handler", ApiSince=34)>]
abstract member SetAllowedHandwritingDelegatePackage : string -> unit
override this.SetAllowedHandwritingDelegatePackage : string -> unit

Parameters

allowedPackageName
String

the package name of a delegate editor view linked to this delegator view, or null to restore the default behavior of only allowing delegate editor views from the same package as this delegator view

Attributes

Remarks

Specifies that this view may act as a handwriting initiation delegator for a delegate editor view from the specified package. If this method is not called, delegators may only be used to initiate handwriting mode for a delegate editor view from the same package as the delegator view. This method allows specifying a different trusted package which may contain a delegate editor view linked to this delegator view.

This method has no effect unless #setHandwritingDelegatorCallback is also called to configure this view to act as a handwriting delegator.

If this method is called on the delegator view, then #setAllowedHandwritingDelegatorPackage should also be called on the delegate editor view.

For example, to configure a delegator view in package 1:

delegatorView.setHandwritingDelegatorCallback(callback);
            delegatorView.setAllowedHandwritingDelegatePackage(package2);

Then to configure the corresponding delegate editor view in package 2:

delegateEditorView.setIsHandwritingDelegate(true);
            delegateEditorView.setAllowedHandwritingDelegatorPackage(package1);

Java documentation for android.view.View.setAllowedHandwritingDelegatePackage(java.lang.String).

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