开发者

Implement ListView in android Widgets

开发者 https://www.devze.com 2023-03-07 22:22 出处:网络
I am making a widget for one of my applications which includes a ListView. I want to display a list of 2 records on my widget.

I am making a widget for one of my applications which includes a ListView.

I want to display a list of 2 records on my widget. I have searched many forums and tutorials but could not开发者_StackOverflow社区 find any tutorial on ListViews in widgets.

Can any one provide me with some good code/tutorials from where i can learn to implement ListViews in Android Widgets.


CommonsGuy has a sample widget application in GitHub using a ListView in a homescreen widget: LoremWidget


Bit late in the day but I've just done this using 3 horizontal linearlayouts within a vertical ll. Set each of the horizontal lls to visibility GONE and then just set visibility to VISIBLE and set text for each one you want to show

Doesn't use a listview but achieves the same end.

0

精彩评论

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