In Android 5 (both emulator and device) when AutoCompleteEditText displays the dropdownlist for suggestions, a black box surrounds it, as shown in the screenshot. This exists only on Android 5.0.
I am also attaching a small sample project and APK for you to try. Make sure you test on an Android 5.0 device or emulator. The code is as shown below.
Please let me know how to fix this.
I am also attaching a small sample project and APK for you to try. Make sure you test on an Android 5.0 device or emulator. The code is as shown below.
Please let me know how to fix this.
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim ae As AutoCompleteEditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim jo As JavaObject
Dim bg As ColorDrawable
bg.Initialize(0xfff3f3f3,0)
ae.Initialize("")
ae.TextColor=Colors.Black
ae.SetItems2(Array As String("aaaa","bbbb","cccc"),ae.Typeface,Gravity.LEFT,ae.TextSize,Colors.Black)
Activity.AddView(ae,15dip,30dip,100%x-30dip,60dip)
ae.RequestFocus
jo=ae
jo.RunMethod("setDropDownBackgroundDrawable",Array As Object(bg))
End Sub