Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 2 个不同的活动共享一个 layout.xml 文件。如果我决定在一个活动中进行诸如 TextView.setText() 之类的更改,那么其他活动是否会经历相同的更改?还是活动只是创建相同布局的不同实例?
如果您在一个活动中更改视图,则另一个不会受到影响,因为您一次只能显示一个活动,因此必须在屏幕上重新创建和重新绘制另一个活动。