Prevent Balloon on theme changed
Wonderjack996 opened this issue · comments
Hi @skydoves. I was using your amazing library, but i didn't find a way to persist the balloon when i change app theme (dark to ligth or viceversa). Is there a predefined way suggested?
Hey @Wonderjack996, altering the device theme involves systematic operations and can be treated as a configuration change. This solution on Stack Overflow might be helpful for listening to the dark mode, allowing you to re-show your balloon:
Alternatively, if your project already uses' ViewModel', you can leverage it to preserve data through configuration changes. For instance, your ViewModel
can hold an observable (LiveData/StateFlow or any other), and your Activity/Fragment or Composable can observe state changes and display your balloon accordingly.