Android Question [SOLVED] Example with Scrollview and Cardview

killiak

Member
Licensed User
Longtime User
Ok, i manage to create a Card example where i have 4 cards, each one has it's own design and i manage to load them from a Scrollview. Still some graphics issues but i'll manage that. Each Cardview has a label that now is manually fill.

But i want to take the next step and i want that label to be fill with a PHP/Mysql Combination.

SQL, PHP and all that no problem, done it a couple of times. But I don't now how can i create dinamically Cardviews. I mean i my example all 4 cards are manually create, each one declare as CV1, CV2....i manage each cardview like this

B4X:
    cv1.MaxElevation = 10dip
    cv1.Elevation = 4dip
    cv1.Radius = 0dip
    cv1.Panel.LoadLayout("card1")
    txtFirstName.Width = cv1.Width - 40dip

Each one is part of a scrollview.panel.addview(cv1....)

But the problem is that that's not dynamic. I want to get 1,2,XX cardviews from SQL. Maybe someone can help me about it. Maybe someone can help me out a little bit

Thanks!
 
Top