开发者

View instance from RemoteViews

How can I get开发者_如何学JAVA View instance from RemoteViews ? There are RemoteViews.reapply and RemoteViews.apply API functions , but I don't know how to use them.


If you are the one creating the RemoteViews to hand to something else -- as is the case with an AppWidgetProvider -- you cannot "get View instance from RemoteViews". The View hierarchy created from your RemoteViews is created in a different process than your own, and so you do not have direct access to it.


You can use something like:

remoteViews.setTextViewText(R.id.widget_anything, "Anytext");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜