Changing text from another activity
问题 How to dynamically change the content of a TextView from another part of the screen? I have a TabActivity class that draws a RelativeLayout that contains a TextView followed by a with several tabs. Within each tab is a separate Intent. From one of the tab intents, I would like to change the text (via .setText) of the TextView from the parent TabActvity. Is this possible? 回答1: You should use Android Architecture Components : You can create a ViewModel containing LiveData of your data object (