Android Tutorial Android home screen widgets tutorial - part I

Erel

Administrator
Staff member
Licensed User
Please start a new thread and upload your project with the required layout.
 

Massimiliano

Member
Licensed User
Hi,
I'm having some problems with my widget app (sticky service) and the other app activities.

When i show a msgbox inside other activities (not the widget) sometime apps crashes without any message
If i remove the widget (so the service it's stopped) from home screen all seems to be ok.
I've read something about services and modal msgbox, but any help on how to show messages (eg. menu about box, exit application confirm....) would be appreciated

many thanks,
Massimiliano

b4a v5.02
 

Erel

Administrator
Staff member
Licensed User
Please start a new thread for this and make sure to post the error message from the logs.
 

imgsimonebiliato

Well-Known Member
Licensed User
Hello.. Is it possibile to catch every single view of the widget?
Like this code
B4X:
For Each v As View In Activity.GetAllViewsRecursive
...
Next
 

Rusty

Well-Known Member
Licensed User
I've seen where you can now install application shortcuts on the home screen :) and would like to have my widget (once installed) automatically be put on the home screen.
Is there a way/method to do this?
Thanks,
Rusty
 

imgsimonebiliato

Well-Known Member
Licensed User
I've seen where you can now install application shortcuts on the home screen :) and would like to have my widget (once installed) automatically be put on the home screen.
Is there a way/method to do this?
Thanks,
Rusty
You can't.. See my post #188 and #189
 

Galaz

New Member
Licensed User
Hi all,
it is possibile to get value of text from widget ?
To sum up: I update widget and I would like to get value.
Do not ask me why I need this if first I update so I should know the value.
If is possibile please write me how. Thank you.
 

Galaz

New Member
Licensed User
I'm sorry but I don't understand. Which text?
Hello,
Thank you for trying to understand me.
I have some labels in widet that I update. In another activity I would like to get value of those labels. It is possible ? Thank you.
 

Martin Larsen

Active Member
Licensed User
Widgets do not support all views types. The following views are supported:
- Button (default drawable)
- Label (ColorDrawable or GradientDrawable)
- Panel (ColorDrawable or GradientDrawable)
- ImageView
- ProgressBar (both modes)
Does this still apply to newer versions of B4A?

What about very obvious views such as TextView and ListView?
 

Martin Larsen

Active Member
Licensed User
Oh bad :-(

Why such limitations? This means that B4A is not really suited for app widgets as you can only make the most simple kinds of widgets. I think it is a pity because you can make so much with B4A, but now I will have to go back to plain Java based Android for my next app.

Erel, any plans for the future?
 
Top