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

Commit 0975a8dd authored by Vladislav Kaznacheev's avatar Vladislav Kaznacheev Committed by Android (Google) Code Review
Browse files

Merge "Support resource references in pointerShape attributes."

parents b631f7c6 1ad6ec20
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -4506,10 +4506,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                    }
                    break;
                case R.styleable.View_pointerShape:
                    final int resourceId = a.getResourceId(attr, 0);
                    if (resourceId != 0) {
                        setPointerIcon(PointerIcon.loadCustomIcon(
                                context.getResources(), resourceId));
                    } else {
                        final int pointerShape = a.getInt(attr, PointerIcon.STYLE_NOT_SPECIFIED);
                        if (pointerShape != PointerIcon.STYLE_NOT_SPECIFIED) {
                            setPointerIcon(PointerIcon.getSystemIcon(context, pointerShape));
                        }
                    }
                    break;
            }
        }