I am makeing an recycling list view wthere has a search bar but it not working properly.see this apk:
Feed_pro.apk (5.4 MB)
You don’t have to initialise the recycler view every time, just use notify data set changed function that will update the data in list view.
u can see in the block pic.
I initialise the recycler view every time
can u explain this
You can achieve this just by using when text box text changed event… In that just set
if the text box length is greter than 1
Then recyler data to above said global list
Else set recycler data to name list
And nothing else needed.
No need to create that ini block again
Based on the above blocks that recycler view will be created when the text box length is greater than 1 else it be created with original global data list
Got it?
There is a function named Notify data set changed in this extension. When there is any change in data variables then you can use this function to notify recycler view that there is change in data so it will reflect on the UI.
So on text box text changes you are updating the variables that is fine now instead of initialising the recycler view again just use notify data change function.