Język

GestureLibraries.FromFileDescriptor(ParcelFileDescriptor) Method

Definition

Creates a gesture library backed by an open file descriptor.

[Android.Runtime.Register("fromFileDescriptor", "(Landroid/os/ParcelFileDescriptor;)Landroid/gesture/GestureLibrary;", "", ApiSince=30)]
public static Android.Gestures.GestureLibrary FromFileDescriptor(Android.OS.ParcelFileDescriptor pfd);
[<Android.Runtime.Register("fromFileDescriptor", "(Landroid/os/ParcelFileDescriptor;)Landroid/gesture/GestureLibrary;", "", ApiSince=30)>]
static member FromFileDescriptor : Android.OS.ParcelFileDescriptor -> Android.Gestures.GestureLibrary

Parameters

pfd
ParcelFileDescriptor

An open parcel file descriptor for the gesture data.

Returns

A gesture library that uses the supplied descriptor for loading and saving.

Attributes

Remarks

This factory does not load gesture data or duplicate the descriptor. Keep the supplied descriptor open while the library uses it, and close it when it is no longer needed. Loading and saving use its current file position without rewinding it. They close their stream wrappers, but those wrappers do not own or close the supplied descriptor on Android.

Based on the Android 17 GestureLibraries implementation.

Descriptor ownership follows the Android implementations of FileInputStream and FileOutputStream.

Applies to