Android Question CustomListView Custom Properties

rscheel

Well-Known Member
Licensed User
Longtime User
How can I configure Custom Properties by code?

Propiedades.PNG
 

LucaMs

Expert
Licensed User
Longtime User
You can't (I don't understand why and when you need that; at runtime?!?!).

As you know, you can create your custom properties declaring them in the custom view class.
B4X:
#DesignerProperty: Key: BooleanExample, DisplayName: Boolean Example, FieldType: Boolean, DefaultValue: True, Description: Example of a boolean property.
 
Upvote 0

rscheel

Well-Known Member
Licensed User
Longtime User
I am using AHSwipeToRefresh, and I could not manage to load the CustomListview of the designer, therefore I had to create it at runtime the CustomListView, so I need to pass the properties to it at run time.

B4X:
Sub Globals
    Private CustomList As CustomListView
    Private CardView As CardView 'I believe in the designer LayoutCellItem
    Dim STR As AHSwipeToRefreshMulti  'I believe in the designer LayoutMain
    Private PanelListView As Panel
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("LayoutMain")
    PanelListView.Initialize("")
    CustomList.Initialize("","CustomList")
    PanelListView.AddView(CustomList.AsView,0,0,100%x,100%y)
    STR.AddView(PanelListView)
End Sub
 
Upvote 0
Top