开发者

Android: Working with AppWidget and their allowed operations

I'm here to ask you an help to my doubts on AppWidget. At the moment I'm trying to build an AppWidget that visualizes a timetable; I have build a layout that contains columns for d开发者_如何学Pythonays of week made of: a FrameLayout that contains a LinearLayout(for a background) and a RelativeLayout in which I want to put user appointments. About appointments I want to build TextView that can be different in dimension, color, and position in the RelativeLayout...

is there anyone who knows how to this?

I have seen that RemoteViews are very limited in available actions but at the same time I have found some AppWidgets those do this feature..

Thanks a lot.


You can manipulate widgets to a certain extend (e.g. setting a completely different widget layout when updating it), but yes, RemoteViews are somewhat limited. Since the first part of your question is vague, I can only give this answer here. But which Views you can use and what operations are available on RemoteViews is pretty well documented.

What you might have seen, and is quite common, is something that looks like a widget but is in reality a launcher feature. For example the HTC sense widgets. These can have different sizes for one single widget entry from the menu, listviews and some other things. Thats because they are using the sense launcher in an undocumentated way that is not useable by external devs. Often you can find out if the widget in question is a real widget by placing it using a different launcher (e.g. the android stock launcher). This can't be done with these 'special' widgets, they will show an error.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜