Reputation: 557
How to make widget with something like ListView. I've made it using LinearLayout but I don't know how to discover amount of rows. (I want to know exact amount of rows to make widget able to paging)
I want it to look like this (photoshop and copypast):
Notes:
UPDATE AND CLARIFICATION:
When I said "scrollable" I mean scroll by click on UP and DOWN buttons (you see it on the screenshot) ie paging
Upvotes: 10
Views: 1389
Reputation: 570
I do not know how to determine real size the widget 4x4 in dp. It seems that it can be determined only by knowing the specific device.
You can scroll by fixed number of rows.
Upvotes: 2
Reputation: 28470
The only pre 3.0 example with source I know of is the ScrollableContacts project on Google Code. It features a scrollable list in a home screen widget and works from 2.1. However, the widget requires a home replacement - see the project description. The source can be viewed here.
Upvotes: 1