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.
我是 android 的初学者,我有一个用户创建帐户的应用程序。创建帐户后,用户可以访问大量活动。无论他在哪个活动中,我都需要测试用户的位置并更新它。我该怎么做?我需要使用广播接收器或类似的东西吗?
例如,如果您使用文本视图来显示位置,则不同活动中的所有文本视图可能具有相同的名称,使用 findviewbyid() 获取文本视图并在不同的活动中更新它。