Merge "Support resource references in pointerShape attributes."
This commit is contained in:
committed by
Android (Google) Code Review
commit
0975a8dda6
@@ -4506,9 +4506,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
}
|
||||
break;
|
||||
case R.styleable.View_pointerShape:
|
||||
final int pointerShape = a.getInt(attr, PointerIcon.STYLE_NOT_SPECIFIED);
|
||||
if (pointerShape != PointerIcon.STYLE_NOT_SPECIFIED) {
|
||||
setPointerIcon(PointerIcon.getSystemIcon(context, 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user