android - Supported methods on RemoteViews -


i trying forward values android remoteview. values can forwarded via set methods use reflection. eg background color works:

rv.setint(r.id.viewid, "setbackgroundcolor", 0xffff0000); 

although mechanism looks pretty generic 1 param methods calls, doesn't work methods. eg. setting alpha on view doesn't work (running on api level 15):

rv.setfloat(r.id.viewid, "setalpha", 0.5f); 

the framework complains @ runtime setalpha(float) not supported. know why case? rule supported methods on remote view? why would't alpha among them?

update:

the answer commonsware correct. after more research might interesting imageview.setalpha(int) remotable. sets alpha on image , therefore not apply ninepatches etc. useful some.

does know why case? rule supported methods on remote view?

setbackgroundcolor() has @remotableviewmethod annotation. setalpha() not.

why would't alpha among them?

that concrete technical reason simple oversight. welcome either file feature request on http://b.android.com have annotation added in future version of android, or perhaps implement , submit patch.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

c++ - Accessing inactive union member and undefined behavior? -

php - Get uncommon values from two or more arrays -