Implement ListView in android Widgets
Asked Answered
C

2

21

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.

Casement answered 23/5, 2011 at 5:41 Comment(1)
try this ([adding views to linearlayout][1]) [1]: #4078539Inference
A
22

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

Altercate answered 23/5, 2011 at 6:47 Comment(4)
That example seems not to run on my Droid BionicManiemanifest
i am using LoremWidget right now. how can i get a refernce to the listview there? getListView() does nothing :/Dittman
that sample now has properly specified its min sdk as 11 (3.x) github.com/commonsguy/cw-advandroid/commit/…Exostosis
I tried to use this, but I got problems. I tried to discribe them: #31713873Diabolo
R
-1

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.

Rebane answered 25/8, 2015 at 23:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.