I want a help to create a firebase structure to my project

Hi Anugrah,

As agreed, I’m posting the solution we reached through our messages, maybe it could be helpful to someone else as well.


I’ll start by explaining what I’ve done so far.

How to switch screen better,

(Since I’m not entirely sure what your end goal is, I followed my own logic for now—but of course, it can always be changed later.)

First, I restructured the objects on the server to allow for easier manipulation of the items. I used a format like item0001, item0002, and so on.


DatabaseJSON.zip (415 Bytes)

Then, as I mentioned earlier, I downloaded all the data at once by setting the ProjectBucket to an empty string ("") and using .GetValue with the tag "cusonloading".

**

Do not share your Firebase token on the forum!!!

**

As soon as the data was received, I initialized the RecyclerView.
I strongly recommend checking out some guides on it—it’s really useful.

I then used the RecyclerView to create the UI elements.

Similar to how Dynamic Components uses componentName to identify components, RecyclerView uses SetUniqueId.
For each component it creates, the RV tells you its position in the list within the VerticalScrollArrangement (RV use a VerticalArrangement which is scrollable).
I took advantage of that to match the on-screen position with the corresponding entry in the database.

It’s better to use schemas rather than creating each component manually in Kodular, it’s lighter for the app, so I added a screen called schemaCardItem to create the schema.

I used formatItem procedure to convert the position (e.g. 1, 2, 3) into the format 0001, 0002, 0003, so it aligns with the IDs on the server.

Finally, when the event when any Card View.Click is triggered, it will return the name of the clicked CardView in the format item0001.

I hope I didn’t make things too complicated.
If you need anything else, I’m here :flexed_biceps:.

CustomLoading.aia (451.0 KB)

1 Like