** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (mysql) Create **
** Service (mysql) Start **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
** Service (mysql) Start **
Raising.. schema_status
Connected to Database
** Activity (main) Pause, UserClosed = false **
** Activity (listatablas) Create, isFirst = true **
** Activity (listatablas) Resume **
** Activity (listatablas) Pause, UserClosed = false **
** Activity (querymanager) Create, isFirst = true **
** Activity (querymanager) Resume **
** Activity (querymanager) Pause, UserClosed = false **
** Activity (query) Create, isFirst = true **
** Activity (query) Resume **
MySQL Database not connected!
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
hasIcon: false
Raising.. tables_status
Connected to Database
** Activity (query) Pause, UserClosed = false **
** Activity (resultadoselect) Create, isFirst = true **
** Activity (resultadoselect) Resume **
** Activity (resultadoselect) Pause, UserClosed = false **
** Activity (resultadoselect) Create, isFirst = false **
SELECT * FROM channels - TablesSQL
** Activity (resultadoselect) Resume **
** Service (starter) Destroy **
** Service (mysql) Destroy **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("ResultadoSELECT")
f.Initialize
Telefono.SetScreenOrientation(0)
Activity.Title=" Query Results"
BotonSiguiente.Visible=False
BotonPrevio.Visible=False
Barra.SetAsActionBar
Barra.InitMenuListener
ABHelper.Initialize
ABHelper.ShowUpIndicator = True
Activity.AddMenuItem("Save Query","GrabarQuery")
Activity.AddMenuItem("Show the SQL Statement","ShowSQL")
Activity.AddMenuItem("Export","Export")
MySQL.CorroSQL=True
If FirstTime=False Then
ProgressDialogShow2("Running SQL",False)
CallSub2(MySQL,"LeoMySQLTables",CreateMap("TextoSQL":MySQL.TextoSQL,"Activity":"ResultadoSELECT","Modulo":"TablesSQL"))
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then
StateManager.ResetState("ResultadoQUERY")
Telefono.SetScreenOrientation(-1)
Activity.Finish
Else
StateManager.SaveState(Activity, "ResultadoQUERY")
End If
StateManager.SaveSettings
End Sub
SetScreenOrientation should only be used if you want to change the orientation at runtime. You should instead change the #SupportedOrientations attribute.
SetActivityAttribute(video, android:screenOrientation, "landscape")
In manifest
This will change the activity video to landscape only
B4X:SetActivityAttribute(video, android:screenOrientation, "landscape")
Thanks Erel,
But I need to set some Activitys with PORTRAIL and just one LANDSCOPE
I see that #SupportedOrientations is for the entire APP
Sub Globals
Dim Phone1 As Phone
' .............
' .............
' .............
Sub Activity_Create(FirstTime As Boolean)
Phone1.SetScreenOrientation(0) ' landscape
' .............
' .............
' .............
Sub Activity_Pause (UserClosed As Boolean)
if UserClosed then Phone1.SetScreenOrientation(-1) ' unlock screen rotation
' .............
' .............
' .............
That is the mistake, only you would have to put in which is landscape.All my Activitys has this SetScreenOrientation() statement.
How can I set ONE only Activity as LANDSCOPE but without runs Create Sub 2 times ?
It is logical that reenters Create, are forcing a change of orientation, although this change is by code.but if you read this thread you will understand that the command is executed, the SUB Create running again ... which makes very little-productive
f you do not want to change the manifest manually
That is the mistake, only you would have to put in which is landscape.
Not really Jesus,
Because, If you have a Layout that only works in Portrait, you must to set this value as the unique possible value.
Regards
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("ResultadoSELECT")
f.Initialize
Telefono.SetScreenOrientation(0) ' <-- This causes rotate and re-enters in create
Yes that always works, but in your code you add this:
B4X:Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("ResultadoSELECT") f.Initialize Telefono.SetScreenOrientation(0) ' <-- This causes rotate and re-enters in create
Regards
Dear remember that the same had already answered in the forum in Spanish.
Hi Rscheel,
But I hasn't the same responses. I love Spanish forum, but at this case, I have the best response here.
Regards
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?