How to get the View that hold a specific Drawable?

时间:2015-07-08 15:40:54

标签: android parent-child android-drawable

It is possible to get the View that hold a specific drawable ?

1 个答案:

答案 0 :(得分:1)

It is not possible directly. What you can do is tag the View, using view.setTag(...);, with the Drawable's name, or is res int, (R.drawable.the_drawable) value, and then use findViewWithTag to retrieve it.