Using a Widget in Activity
it's me again :-)
Is there a way to use a widget (for home screen) in my own activit开发者_开发问答es? i think the homescreen is made with java, too?!
i do not want to change thinks in the widget, i still want to display them.
Regards FLy
If you are looking to "re-use" a widget's layout and may be its base code, that is possible. I don't think it will be a good idea [or possible] to display a widget as an activity.
There are a lot of limitations in the number of view elements that can be used inside a widget. And again the way you will update a widget [RemoteViews] is actually very different from that of an Activity.
So in short, the answer would be a "NO".
Edit: This question has also been asked and answered a lot of times: difference between view and widget
精彩评论