I tried now different variants, but scrollbar is not visible. How to enable Scrollbar in PreferencesDialog?
B4X:
Sub ManageSettings
Dim sets As Map = cG.mapSettings
'Dim pd_Settings As PreferencesDialog 'already in Globals
'pd_Settings.Initialize(Activity, "Settings", 300dip, 200dip) 'already in Activity_Create
pd_Settings.LoadFromJson(File.ReadString(File.DirAssets, "Settings.json"))
Wait For (pd_Settings.ShowDialog(sets, "OK", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
File.WriteMap(xui.DefaultFolder, cG.SETTINGSFILE, sets)
End If
End Sub
Sub btnSettings_Click
setVerticalScrollBarEnabled(pd_Settings.CustomListView1.sv, True) 'before loading pref dialog?
ManageSettings
setVerticalScrollBarEnabled(pd_Settings.CustomListView1.sv, True) 'after loading pref dialog?
End Sub
'displays or hides the VerticalScrollBar of the ScrollView
Sub setVerticalScrollBarEnabled(v As View, Enabled As Boolean) 'https://www.b4x.com/android/forum/threads/scrollview-properties.40878/
Dim jo = v As JavaObject
jo.RunMethod("setVerticalScrollBarEnabled", Array As Object (Enabled))
End Sub