hello Please Help Me…
I Facing issuse in dynamic componate …I am making a shayri app and created custom desine list viwe using dynamic componate for showing shayri…and have a some category in a app…
see this image
But there are some issue… When User click on category then got data (Category Clicked Data) from fierbase. then list viwe worked properly. but after again clicked another category then coming some issue in list viwe. first clicked category data and second data automatically has been added in list viwe…
See this image…
What’s a problem…?
see this my block…
When Click Category
Close Other Layout And Call Data…
Call Data Block
When Got Data and after call Loop
the problem is dynamic componate lable text not removed the first data in list viwe , the first data and other data automaticly added and after all data shown in list viwe…
hope are you understand, so please solved my problem…!
Watch this vedio…
if you are using a single variable to store data after calling it from firebase.
always clear the last entries before adding new values to it.
in Data Procedure -
initialize Call_Shayri_text as Empty List.
I have tried this method, but not working…
I think there are error in dynamic componate AIX ya my blocks, Because when i am using list viwe componate then work properly but when using dynamic componate AIX then this error came…
Please help me…
if you are using the same Procedure again to create the list again in same Arrangement
then first Delete the last created Components using loop-
@ADDYLIN not working…
When First time clicked any category then worked properly… But after again clicked any category then not showing all value… Only showing last some value and first value automatically is Removed…
I really don’t know what’s wrong here…?
Can you share your Blocks.
As I told you before also @Mr_PRAKASH_THUL you should code that the older data that is the first category clicked it should clear the response.
Remove the old cardview and add new cardviews on every category change.
If you post your relevant block is more easy found the error, help you and found the solution for you
Yes please give us more information.
How can I give you more information if I don’t see the blocks and tell you where to insert the solution proposed by @ADDYLIN
Edit: This are the solution but if you don’t know where to insert these blocks, don’t work for you !!!
@Mr_PRAKASH_THUL have you posted all your blocks?
Ok let me understand. You need to hide a card view after touching a label ??
In this case when label click get the label ID and remove a card view with the same ID, in this way you remove the card view.
You can use this block of code after a element which is of a different category is clicked.
I think this should work as said by @ADDYLIN and @bestprintsf
this is blocks…
And when click screen back pressed then i am using this block…
Dynamic Components Error, Help me - #16 by Kshitij on category change so that it removes old cardviews and creates new one as per your code. But remember to make a backup of your project so if anything goes wrong you don’t need to suffer. Try and see if this works.
You are right @Kshitij but you can remove the item from the list and when tab the button created a new category without you remove item from list
Edit: Dynamic components not is to easy to understand how does it work.
@ADDYLIN @Kshitij @bestprintsf
This problem has been solved due to the guidance of all off you. Keep up the good work.
Thanks You All Of You…
And Have a nice day…