Closed SudoDios closed 3 years ago
HI @SudoDios, It's a really good question.
1- You should synchronize the RecyclerView theme in Viewholders. I mean in the RecyclerView adapter and inonBindViewHolder
method, with the use of ThemeManager
.
2- After the theme is changed, if the fragment that contained RecyclerView was displaying, call notifyDataSetChanged()
from its adapter.
I will add the sample in a week.
Thankful.
I solved this issue that day but I forgot to close this issue 😌
@SudoDios can you share sample?
@SudoDios can you share sample?
Hi @FaArIsH ! Di you manage to solve it? I´m also triying to do the same with the action bar if you can help me. Thanks !!
@SudoDios can you share sample?
Hi @FaArIsH ! Di you manage to solve it? I´m also triying to do the same with the action bar if you can help me. Thanks !!
yes but not fully because i dont know how to call notifyDataSetChanged() from main activity i added onclick in child adaptor so when i click the child it get updated
i followed this https://github.com/karimov0147/E-Book-Little-Prince/blob/master/app/src/main/java/com/example/bubook/localStorage/Resources.kt https://github.com/karimov0147/E-Book-Little-Prince/blob/master/app/src/main/java/com/example/bubook/screens/InfoScreen.kt
You can solve the problem with the help of observer in everywhere
Can you elaborate that a bit more @SudoDios? Thanks !
What should I explain? 🧐 This is very easy
i modified my adapter by looking at this code https://github.com/karimov0147/E-Book-Little-Prince/blob/master/app/src/main/java/com/example/bubook/utills/AdapterRV.kt and now i m able to call adapter.notifyDataSetChanged() thanks @karimov0147
how to update RecyclerView?