Android Question ListView or ScrollView in Homescreen Widgets?

Inman

Well-Known Member
Licensed User
Longtime User
I am working on app that lets user create scheduled alerts. I would like to have a widget which will show the user a list of his upcoming alerts. Since it is a list, I believe it should be done with a scrollable view like ListView or ScrollView. Android supports such widgets from 3.0.

Is it possible to create scrollable widgets like these, in B4A?

s0dzXMdAlrbFRsCDdkTl5Jts8k-2rnAqNq-iznbRMJgvz-4RkDFtb4L-1oYi643_7_0=h900-rw
 

Jerez

Active Member
Licensed User
Longtime User
And today?
 
Upvote 0

wes58

Active Member
Licensed User
Longtime User
And today?
I have been trying to implement StackView Widget and ListView Widget as a seperate jar. If you know some java (or are willing to learn, like I had to) you could make something from attached files.
It's not the best way of doing this, but I didn't want to spend time on learing java since this is just a hobby for me. Knowledge of C and b4A is enough for me.
I have attached a sample b4A project which I was using for learing/testing. To compile it, you have to copy ListWidget.jar into your additional libraries folder.
I have also attached an eclipse project where you can modify the widget layout (widget_item.xml, widget_provider_layout.xml, widget_provider.xml) and java files. If you make any changes to xml files you have to copy them into \resources directory in b4A project.
Have a look first if this is something what you would like to do. If yes, then maybe I can help you, with my limited knowledge of java. Or maybe someone else will make something better.
 

Attachments

  • WidgetList.zip
    125.5 KB · Views: 352
  • Screenshot.png
    Screenshot.png
    129.3 KB · Views: 685
Upvote 0
Top