This example uses xCustomListView to implement a list of cards.
As the items layout is created with the designer, it is simple to implement any layout you like. You can also combine different types of items in the same list.
The divider color and pressed color are set to transparent.
The items layout is made of a base panel. This panel is elevated and it has round corners.
Labels are used instead of buttons for the two actions.
The following code (based on: https://www.b4x.com/android/forum/threads/colorstatelist.40788/#content) sets the labels text color to a ColorStateList:
Sub SetColorStateList(Btn As Label,Pressed As Int,Enabled As Int) Dim States(2,1) As Int States(0,0) = 16842919 'Pressed States(1,0) = 16842910 'Enabled Dim CSL As JavaObject CSL.InitializeNewInstance("android.content.res.ColorStateList",Array(States,Array As Int(Pressed, Enabled))) Dim B1 As JavaObject = Btn B1.RunMethod("setTextColor",Array As Object(CSL)) End Sub
The action bar color is set in the manifest editor: https://www.b4x.com/android/forum/threads/theme-colors.87716/#content
114.4 KB Views: 2,130