New CustomListView Extension
After Kodular introduced Dictionaries, I found a way to make the extension use fewer blocks. Now you can make all the designs you want to, using fewer blocks.
SUPPORTED WIDGETS
Arrangements
Buttons and ImageButtons
CardViews
Images
Labels
ProgressBar
RatingBar
TextBox
How the extension works?
Look at the image bellow. First add the listview to your arrangement, second add the widgets you want, and finally load the listview with the data.
When you scroll the listview, event OnBindView is called, here you change the listview data or widgets style according to the position.
When you click a widget, the event OnWidgetClicked gets called, and you can make changes here too.
What can you do with them?
Edit all of these properties
And how do we edit them?
This is what styles are made for. Styles are a collection of properties that you can set to many widgets you want to.
Let’s supose that you want to use the same properties for many widgets. Whit this extension, you should first create your style.
And how to apply?
Just look at this block, you should pass the style as parameter.
And what if you want to use that style but change something, ExtendStyle block was made for it, just look how it works.
You can also edit many widgets with one block
Ex. BackgroundColor property
Widgets id are separated by comas and values for each are in a list. This is helpful when you wanna make conditions. Look at the first image.
SOME NEW FEATURES
Edit many blocks with just one block.
Load pictures, from assets, from file or from web url.
Capacity to round your pictures for images.
BACKGROUNDS [GRADIENT(many colors as you want), OVAL, CIRCLE] for every widget.
Round corners and borders, with custom color and width.
Transform the pictures, with scale size for larger images.
If you want the cardview as a container for every widget, you should add as the same way as to add Arrangement, you can set its parent as “MainParent” then it ll be in the root. And then, when you add a label or ilage specify on parent the cardview id, or better, in cardview add an arrangement (if you wanna set the orientation to horizontal or vertical) and add them to this linear.
You can add widgets directly to the cardview.
Yes, card radius will affect the image so it will have the same radius as cardview parent. But if you want circle picture, you can use the new edit image block.