如何获取持有特定 Drawable 的 View?
How to get the View that hold a specific Drawable?
可以获取包含特定 drawable 的 View ?
直接是不可能的。您可以做的是标记 View
,使用 view.setTag(...);
,使用 Drawable
的名称,或者是 res int
,(R.drawable.the_drawable
) 值,以及然后使用 findViewWithTag
检索它。
可以获取包含特定 drawable 的 View ?
直接是不可能的。您可以做的是标记 View
,使用 view.setTag(...);
,使用 Drawable
的名称,或者是 res int
,(R.drawable.the_drawable
) 值,以及然后使用 findViewWithTag
检索它。