S SjaiuwaSALjw New Member Licensed User Longtime User Jun 17, 2016 #1 Hi! I have a MsgBox on my application and i have realised that the text isn't showing on Android 6.0 devices, but on other android versions it is. My SdkVersion is set to 23, and this is the code of the dialog Code: If gpsClient.GPSEnabled=False Then ret = Msgbox2("GPS Disabled. Enable?", "GPS Disabled", "YES", "", "NO", Null) Select ret Case DialogResponse.POSITIVE StartActivity(gpsClient.LocationSettingsIntent) End Select End If The MsgBox always appears, but on android 6.0 shows an empty MsgBox with the buttons YES and NO. Why is that? Thank you, Gerard
Hi! I have a MsgBox on my application and i have realised that the text isn't showing on Android 6.0 devices, but on other android versions it is. My SdkVersion is set to 23, and this is the code of the dialog Code: If gpsClient.GPSEnabled=False Then ret = Msgbox2("GPS Disabled. Enable?", "GPS Disabled", "YES", "", "NO", Null) Select ret Case DialogResponse.POSITIVE StartActivity(gpsClient.LocationSettingsIntent) End Select End If The MsgBox always appears, but on android 6.0 shows an empty MsgBox with the buttons YES and NO. Why is that? Thank you, Gerard
Erel B4X founder Staff member Licensed User Longtime User Jun 17, 2016 #2 Does this code work properly for you: Code: Sub Activity_Create(FirstTime As Boolean) Msgbox2("GPS Disabled. Enable?", "GPS Disabled", "YES", "", "NO", Null) End Sub Upvote 0
Does this code work properly for you: Code: Sub Activity_Create(FirstTime As Boolean) Msgbox2("GPS Disabled. Enable?", "GPS Disabled", "YES", "", "NO", Null) End Sub
S SjaiuwaSALjw New Member Licensed User Longtime User Jun 17, 2016 #3 This code isn't working for me: If you use the string collector (ret) sometimes shows the MsgBox empty, and sometimes just goes out the sub. Without "ret" (Your code, Erel) the app show the MsgBox empty. It happens with MsgBox and MsgBox2 too. Upvote 0
This code isn't working for me: If you use the string collector (ret) sometimes shows the MsgBox empty, and sometimes just goes out the sub. Without "ret" (Your code, Erel) the app show the MsgBox empty. It happens with MsgBox and MsgBox2 too.
Erel B4X founder Staff member Licensed User Longtime User Jun 19, 2016 #4 Please try to reproduce it in a small project and upload it. Upvote 0
S SjaiuwaSALjw New Member Licensed User Longtime User Jun 20, 2016 #5 I found it. The problem was that i didn't had defined a theme for the AlertDialog. So I've made a few changes: HTML: <style name="MyTheme" parent="android:Theme.Material.Light"> <item name="android:alertDialogTheme">@style/MyAlertDialogTheme</item> </style> <style name="MyAlertDialogTheme"> <item name="android:windowIsFloating">true</item> <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> <item name="android:textColor">#000000</item> </style> EDIT: What happened was that the dialog worked fine, but the text color was white And MsgBox it's working fine too now that i'm using B4A 6.0. I was using the BETA version before... Upvote 0
I found it. The problem was that i didn't had defined a theme for the AlertDialog. So I've made a few changes: HTML: <style name="MyTheme" parent="android:Theme.Material.Light"> <item name="android:alertDialogTheme">@style/MyAlertDialogTheme</item> </style> <style name="MyAlertDialogTheme"> <item name="android:windowIsFloating">true</item> <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> <item name="android:textColor">#000000</item> </style> EDIT: What happened was that the dialog worked fine, but the text color was white And MsgBox it's working fine too now that i'm using B4A 6.0. I was using the BETA version before...