Update UI after user changes settings
I am using LiveData and Room. In settings activity I have an option to change unit of drink volume. Based on selection I am converting ML to CL.
If user changes setting and then return to MainActivity using UP button, everything works fine.
But when I change setting and then use back button, data is not refreshed. How I can fix this?
Main Activity
override fun onCreate(savedInstanceState: Bundle?) {
setTheme(R.style.AppTheme_NoActionBar)
super.onCreate(savedInstanceState)...