Get clicked buttonsâ id with GetId block and use it in if block. (Example, if id equals 1, show a toast, else if id equals 2, change the button text.)
ok thanks I had not noticed the getID, everything worked well
Another benefit of string ID is the ability to store lists in it and reference when needed. It will be easier to identify a card and there is no limit to how many components it can make before overlapping IDs
Actually you can already store integer IDs in a list. String ID will only allow adding characters inside to the ID along with numbers. Nothing more.
ID is ID, even a number or string, both of them is unique, never overlaps. And always unique.
Oh nice! That way it will be easier
So, how far down the rabbit hole of dynamic components is too far? I have played around with creating almost the entire screen that way. Is there a point that it becomes overboard?
An example would be a form that has questions separated into sections. I created a list (each section) of lists (each question) and used dynamic components to create the entire form including headers, questions, radio buttons, and text boxes. (Iâve been messing around with Dart/Flutter as well and everything is created in a widget tree there, helped me visualize how to do something similar here in Kodular). As the extension developer, where would you say the line should be drawn?
I also ran into an issue trying to make text bold on my headers. I thought adding HTML tags for bold text would work, but it just added the tags as text to the header instead.
I donât think so, if I understood correctly.
You need to enable HTML property too to use HTML tags.
For example, in a quiz app, it is better to use static components because all questions have 4 answers (which is never changes), so it is not needed to creating answers dynamically. Just put 4 constant button and change their texts. I donât suggest creating dynamic component for these type of situations.
Dynamic things are used in situations which you donât know the count. For example you canât learn how much record will be pulled from a table without getting data. But in a quiz app, we already have an information which how many answers will be added.
So using static components is better if you know the count.
The biggest issue is there have been quite a few changes to the forms I use since the first time around and I was thinking (to eventually make things easier for myself) storing the questions on Firebase as a list and grabbing each list and then populating the form. that way if the manager wants to change things it doesnât require an update to the play store.
Yeah, looks like this is a good way to use dynamic components!
Or you have a lot of repetitive components to create. Iâm using it with +230 sprites right now. Itâs a walk in the park!
What is the purpose of adding list to id section? If it was a String id, you wouldnât able to add lists too. Lists has own type. They are not string.
It is so that i can refer to the correct JSON list when a card is clicked. Like how the daily section has its own JSON list and top shows has one JSON list too.
If i cannot identify the card properly, I will have a incorrect result
You should use join block from Text category if you want to join two text pieces, because list block doesnât join two items.
I think you have a little confusion there. I donât see a benefit of using a list in the component ID.
If you want to access every component, then you create a list of IDâs and iterate thru it by using a FOR EACH item IN LIST block.
Or if your confusion is about âbuildingâ the id with different pieces or strings, then what @yusufcihan said about using JOIN is what you need.
Put ID in a list, not a list in ID.
You are using Kodularâs built-in dynamic components, you should migrate to the my extension for creating all dynamic components. Otherwise extension wonât work for you.
As Kodularâs dynamic components returns a reference to the component instead of just returning itself, you canât use Kodularâs dynamic components with my extension. This is not my fault.
Can you please tell me cardview name
âMakeroidCardViewâ is the internal name of CardView as I said in earlier posts.
Thanks
Also, whatâs the internal name of the space component?