I would like to add to View ListView that is defined in xml file...because i see that is the only way that my apk looks same on all devices...i successfully added textview, imageviews, panels...but i im unable to add ListView...
I know that i can add panel using xml to apk...then using dim lv as ListView and then panel.addView(lv, ...)
But i would like to add to apk ListView using xml..because i have then more styles to apply.
here i sthe code that i try:
And i im getting this error:
java.lang.ClassCastException: android.widget.ListView cannot be cast to anywheresoftware.b4a.objects.ListViewWrapper$SimpleListView
I need this to add top and bottom divider in ListView...if is possible using reflector or javaobject then will be great.
I see that this i need to add:
http://developer.android.com/intl/r...tView.html#attr_android:footerDividersEnabled
I set setapplicationattribute in manifest editor but top and bottom dividers are not shown
I know that i can add panel using xml to apk...then using dim lv as ListView and then panel.addView(lv, ...)
But i would like to add to apk ListView using xml..because i have then more styles to apply.
here i sthe code that i try:
B4X:
'DEFINE - XmlLayoutBuilder
Dim Xml As XmlLayoutBuilder
'DEFINE - ListView
Dim lv As ListView
lv = Xml.GetView("lv")
And i im getting this error:
java.lang.ClassCastException: android.widget.ListView cannot be cast to anywheresoftware.b4a.objects.ListViewWrapper$SimpleListView
I need this to add top and bottom divider in ListView...if is possible using reflector or javaobject then will be great.
I see that this i need to add:
http://developer.android.com/intl/r...tView.html#attr_android:footerDividersEnabled
I set setapplicationattribute in manifest editor but top and bottom dividers are not shown
Last edited: