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 应用程序,其中我使用了选项卡。有六个选项卡显示不同的活动。选项卡中的最后一个活动有一个按钮(清除)。当我们单击按钮时,我想清除选项卡中的所有视图。可能吗。请指导我。
只需在按钮的 onclick 事件中调用另一个空白活动。
Try use Fragments instead of Activity for every tab, this way you could clear the tab much more quickly with FragmentManager
FragmentManager