Android ViewModel LiveData update view on button click
问题 I am following this tutorial to learn ViewModel and LiveData. In my case, instead of getting data from network, I am simply generating random string on button click and trying to update a textview. The problem is that the textview does not get updated when the data is changed by button click, but only gets updated when orientation is toggled. Activity Class (extends LifecycleActivity) public class PScreen extends BaseActivity { @Override protected void onCreate(@Nullable Bundle