gpt4 book ai didi

android - 使选项卡仅在选择值时可见

转载 作者:行者123 更新时间:2023-11-29 14:08:39 26 4
gpt4 key购买 nike

我有一个主页,其中包含一个 Spinner。微调器中的值由 Json 值填充。

我在应用程序中有 5 个选项卡,其中第一个选项卡包含主页本身。

The flow is like this Home Page->Select a Values from Spinner->Then display the Tabs only if a value is selected-> The first page in the Tabs is the Home page again with the Spinner Value selected

任何人都可以帮助我,因为我只能在从微调器中选择一个项目时才显示标签...

最佳答案

选项卡标签的 View 是一个 TabWidget。在您的 TabActivity 中尝试:

getTabWidget().setVisibility(View.GONE);

隐藏选项卡标签。如果要隐藏选项卡标签和选定的选项卡内容,则需要使 TabHost 不可见:

getTabHost().setVisibility(View.GONE);

关于android - 使选项卡仅在选择值时可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5064288/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com