开发者

How to get around using a listview in a widget?

开发者 https://www.devze.com 2023-04-04 16:51 出处:网络
I have a list of items loaded. What i want to do with the items is load them into a list in a widget. But i know list widgets are only supported on 3.0 and above.

I have a list of items loaded.

What i want to do with the items is load them into a list in a widget. But i know list widgets are only supported on 3.0 and above.

So what would b开发者_Python百科e the work-around to get this done?

EDIT:

Maybe add a textview each time a item is loaded...and load the text views into a scrollview?


There is no way to support scrolling on a stock home screen before 3.0. Widgets use the RemoteViews framework, which on Android 2.x only supports AbsoluteLayout, AnalogClock, Button, Chronometer, FrameLayout, ImageButton, ImageView, LinearLayout, ProgressBar, RelativeLayout, TextView, and ViewFlipper. The only way you could make something at all list-like, is to have up and down buttons for scrolling between items (note: this could only work for complete clicks--you couldn't have it scroll while holding down the button, for example).

0

精彩评论

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