Android Question Evento for rotate screen width widget

Roberto P.

Well-Known Member
Licensed User
Longtime User
when I rotate the screen with a widget of its contents will be deleted. What event of resume to call the peopling of the information? how to resume the activity?
thanks
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
Yes Erel: when I rotate the device will erase all information (contained in the label) and I have to find an event that automatic face re-read the information.
thanks you
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
clear.
but what determines that when I rotate the screen deletes the values of the label? if you want can send picture by email?
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
I created a service that displays a layout consisting label. In this way

Sub Service_Create

......

rv = ConfigureHomeWidget("Layout", "rv", 0, "Widget", True)

End Sub
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
Galaxi Tab 3 and 4.
I have not installed any lunch. if you want I'll send you the code of the widget
thanks
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
hello Erel,
not when I rotate function is called rv_RequestUpdate?
I am attaching pictures. now I see another problem: that the image is truncated.

Horizzontal
upload_2014-10-19_17-18-9.png


Vertical
upload_2014-10-19_17-20-53.png



Sub Service_Create

.....

rv = ConfigureHomeWidget("L1", "rv", 0, "Widget", True)

End Sub

Sub Service_Start (StartingIntent As Intent)

' If a widget is removed from homescreen we don't need to do anything
If StartingIntent.Action = "android.appwidget.action.APPWIDGET_DELETED" Then Return

' Handle the widget events (RequestUpdate and Disabled)
If rv.HandleWidgetEvents(StartingIntent) = False Then
' If the action is not handled by HandleWidgetEvents() then we
' probably were called by StartService() or StartServiceAt().
' So just update the widget.
rv_RequestUpdate
End If

' We have to be sure that we do not start the service
' again if all widgets are removed from homescreen
If StartingIntent.Action <> "android.appwidget.action.APPWIDGET_DISABLED" Then
StartServiceAt("", TimeToNextMinute, False)
Log("chiamato start StartingIntent.Action " & DateTime.Date(DateTime.Now) & " " & DateTime.time(DateTime.Now))
End If

' ToastMessageShow("Service Start: " & DateTime.Date(DateTime.Now) & " " & DateTime.time(DateTime.Now), False)

End Sub

Sub Service_Resume
ToastMessageShow("SubService_Resume...", True)
End Sub

Sub Service_Pause (UserClosed As Boolean)
ToastMessageShow("Service_Pause...", True)
End Sub

Sub rv_RequestUpdate


QueryAndFillOrdini
QueryAndFillFatture
QueryAndfillPartiteAperte
QueryAndfillPartiteScadute
QueryAndfillClientiAttivi
QueryAndfillNuoviClienti

Log("rv.UpdateWidget")
rv.UpdateWidget

End Sub
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User
OK. I see the start of the log, but no message during the rotation of the screen
 
Upvote 0
Top