Package 

Class PointerIconCompat

    • Method Detail

      • getSystemIcon

         static PointerIconCompat getSystemIcon(Context context, int style)

        Gets a system pointer icon for the given style.If style is not recognized, returns the default pointer icon.

        Parameters:
        context - The context.
        style - The pointer icon style.
      • create

         static PointerIconCompat create(Bitmap bitmap, float hotSpotX, float hotSpotY)

        Creates a custom pointer from the given bitmap and hotspot information.

        Parameters:
        bitmap - The bitmap for the icon.
        hotSpotX - The X offset of the pointer icon hotspot in the bitmap.Must be within the [0, bitmap.getWidth()) range.
        hotSpotY - The Y offset of the pointer icon hotspot in the bitmap.Must be within the [0, bitmap.getHeight()) range.
      • load

         static PointerIconCompat load(Resources resources, int resourceId)

        Loads a custom pointer icon from an XML resource.

        The XML resource should have the following form:<?xml version="1.0" encoding="utf-8"?><pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"android:bitmap="@drawable/my_pointer_bitmap"android:hotSpotX="24"android:hotSpotY="24" />

        Parameters:
        resources - The resources object.
        resourceId - The resource id.