Ogulcan Orhan
Ogulcan Orhan

Reputation: 5317

Widget with ListView in API 4

I already know that ListView is not supported in widgets until HoneyComb. But Foursquare's widget uses ListViews even on API 4 (see the picture).

Is there any way to implement ListView for Widgets in API 4? I've searched document and more nothing mentioned about ListView in Widgets.

When I tried to use, always got inflating error.

I'm curious about suggestions and examples.

Foursquare widget

Upvotes: 2

Views: 409

Answers (1)

w.donahue
w.donahue

Reputation: 10886

I have done something similar to this in one of my widgets. Listview is not supported in API 4, and while this "looks" like a ListView it is not. Its just cleverly positioned images, and text and a border around them that looks like a ListView does.

The arrows are images that when clicked tell the widget to go rerender all the stuff in the "ListView". So it sort of gives an approximation of a ListView on older devices, but you need to use arrows to change the content instead of flicking on the ListView.

Upvotes: 3

Related Questions