android - How to programmatically retrieve the child drawable of an InsetDrawable that was defined in XML -
how can drawable object defined within insetdrawable using android:drawable
or having inner <bitmap android:src>
tag programmatically?
i want have levellistdrawable child of insetdrawable , need call setlevel(int)
on it. insetdrawable.getcurrent() returns insetdrawable object itself, not child drawable.
because have multiple references inset drawable defined in xml files, cannot use ids identify drawable, need retrieve right drawable getcurrent()
, getdrawable()
method calls. statelistdrawable, levellistdrawable, layerdrawable approach works well. how can insetdrawables?
check out source class.
there no way drawable. it's contained inside static inner class insetstate , there no getter method it. classes in same package (android.graphics.drawable) potentially access it, you're out of luck.
Comments
Post a Comment