Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80fdc1bd authored by Jun Mukai's avatar Jun Mukai
Browse files

Allow specifying pointer shape from xml resource.

Bug: 25777986
Change-Id: I8be5d2cb130299b0ea8f4f4d3dc582143f7ff553
parent edd137b9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -925,6 +925,7 @@ package android {
    field public static final deprecated int phoneNumber = 16843111; // 0x1010167
    field public static final int pivotX = 16843189; // 0x10101b5
    field public static final int pivotY = 16843190; // 0x10101b6
    field public static final int pointerShape = 16844042; // 0x101050a
    field public static final int popupAnimationStyle = 16843465; // 0x10102c9
    field public static final int popupBackground = 16843126; // 0x1010176
    field public static final int popupCharacters = 16843332; // 0x1010244
+1 −0
Original line number Diff line number Diff line
@@ -1019,6 +1019,7 @@ package android {
    field public static final deprecated int phoneNumber = 16843111; // 0x1010167
    field public static final int pivotX = 16843189; // 0x10101b5
    field public static final int pivotY = 16843190; // 0x10101b6
    field public static final int pointerShape = 16844042; // 0x101050a
    field public static final int popupAnimationStyle = 16843465; // 0x10102c9
    field public static final int popupBackground = 16843126; // 0x1010176
    field public static final int popupCharacters = 16843332; // 0x1010244
+1 −0
Original line number Diff line number Diff line
@@ -925,6 +925,7 @@ package android {
    field public static final deprecated int phoneNumber = 16843111; // 0x1010167
    field public static final int pivotX = 16843189; // 0x10101b5
    field public static final int pivotY = 16843190; // 0x10101b6
    field public static final int pointerShape = 16844042; // 0x101050a
    field public static final int popupAnimationStyle = 16843465; // 0x10102c9
    field public static final int popupBackground = 16843126; // 0x1010176
    field public static final int popupCharacters = 16843332; // 0x1010244
+6 −0
Original line number Diff line number Diff line
@@ -4487,6 +4487,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                        initializeScrollIndicators = true;
                    }
                    break;
                case R.styleable.View_pointerShape:
                    final int pointerShape = a.getInt(attr, PointerIcon.STYLE_NOT_SPECIFIED);
                    if (pointerShape != PointerIcon.STYLE_NOT_SPECIFIED) {
                        setPointerShape(pointerShape);
                    }
                    break;
            }
        }
+50 −0
Original line number Diff line number Diff line
@@ -2791,6 +2791,56 @@ i
            <flag name="end" value="0x20" />
        </attr>

        <attr name="pointerShape">
            <!-- Null icon, pointer becomes invisible. -->
            <enum name="none" value="0" />
            <!-- The default icon of arrow pointer. -->
            <enum name="arrow" value="1000" />
            <!-- Pointer icon indicating context-menu will appear. -->
            <enum name="context_menu" value="1001" />
            <!-- Pointer icon of a hand with the index finger. -->
            <enum name="hand" value="1002" />
            <!-- Pointer icon indicating help. -->
            <enum name="help" value="1003" />
            <!-- Pointer icon indicating something is going on and waiting. -->
            <enum name="wait" value="1004" />
            <!-- Pointer icon for cell and grid. -->
            <enum name="cell" value="1006" />
            <!-- Pointer icon of crosshair, indicating to spot a location. -->
            <enum name="crosshair" value="1007" />
            <!-- Pointer icon of I-beam, usually for text. -->
            <enum name="text" value="1008" />
            <!-- Pointer icon of I-beam with 90-degree rotated, for vertical text. -->
            <enum name="vertical_text" value="1009" />
            <!-- Pointer icon of 'alias', indicating an alias of/shortcut to something is to be
                 created. -->
            <enum name="alias" value="1010" />
            <!-- Pointer icon of 'copy', used for drag/drop. -->
            <enum name="copy" value="1011" />
            <!-- Pointer icon of 'no-drop', indicating the drop will not be accepted at the
                 current location. -->
            <enum name="no_drop" value="1012" />
            <!-- Pointer icon of four-way arrows, indicating scrolling all direction. -->
            <enum name="all_scroll" value="1013" />
            <!-- Pointer icon of horizontal double arrow, indicating horizontal resize. -->
            <enum name="horizontal_double_arrow" value="1014" />
            <!-- Pointer icon of vertical double arrow, indicating vertical resize. -->
            <enum name="vertical_double_arrow" value="1015" />
            <!-- Pointer icon of diagonal double arrow, starting from top-right to bottom-left.
                 Indicating freeform resize. -->
            <enum name="top_right_diagonal_double_arrow" value="1016" />
            <!-- Pointer icon of diagonal double arrow, starting from top-left to bottom-right.
                 Indicating freeform resize. -->
            <enum name="top_left_diagonal_double_arrow" value="1017" />
            <!-- Pointer icon indicating zoom-in. -->
            <enum name="zoom_in" value="1018" />
            <!-- Pointer icon indicating zoom-out. -->
            <enum name="zoom_out" value="1019" />
            <!-- Pointer icon of a hand sign to grab something. -->
            <enum name="grab" value="1020" />
            <!-- Pointer icon of a hand sign while grabbing something. -->
            <enum name="grabbing" value="1021" />
        </attr>
    </declare-styleable>

    <!-- Attributes that can be assigned to a tag for a particular View. -->
Loading