Implement ListView in android Widgets-ThrowExceptions

Exception or error:

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 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.

How to solve:

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.

Leave a Reply

Your email address will not be published. Required fields are marked *