Use perhaps the shortoptions: Try it it seems to work for me:I want put a line inside B4XPreferencesDialog to call a sub.... same that:
prefdialog.AddShortOptionsItem("Options","Country" , Array ("Australia", "Spain"," England", "France", "United States of America"))
Dim Data As Map = CreateMap("Options":"") 'of course you can have other items in the map
Dim sf As Object = prefdialog.ShowDialog(Data, "OK", "CANCEL")
Wait For (sf) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
If Data.Get("Options").As(String).Contains("Spain") Then
Log("Best women football Team in the world")
Dim i As Intent
i.Initialize("com.android.settings.TTS_SETTINGS", "")
StartActivity(i)
End If
End If
Hi friend, thanks for your replyUse perhaps the shortoptions: Try it it seems to work for me:
B4X:prefdialog.AddShortOptionsItem("Options","Country" , Array ("Australia", "Spain"," England", "France", "United States of America")) Dim Data As Map = CreateMap("Options":"") 'of course you can have other items in the map Dim sf As Object = prefdialog.ShowDialog(Data, "OK", "CANCEL") Wait For (sf) Complete (Result As Int) If Result = xui.DialogResponse_Positive Then If Data.Get("Options").As(String).Contains("Spain") Then Log("Best women football Team in the world") Dim i As Intent i.Initialize("com.android.settings.TTS_SETTINGS", "") StartActivity(i) End If End If
You will need to modify the source code for that.mmm i looking something like a static menu line......