如何禁用Android的屏幕选项卡? [英] how to disable a tab in android screen?

查看:119
本文介绍了如何禁用Android的屏幕选项卡?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,你能告诉我如何禁用选项卡中的Andr​​oid code中的UI。(闪电code)

hi can you tell me how to disable a tab in the UI of android code.. (eclair code)

推荐答案

如果你的意思是禁用TabWidget一个选项卡按钮,然后尝试这个code:

If you mean to disable one tab button on TabWidget, then try this code:

// tabHost = ... (get TabHost)
tabHost.getTabWidget().getChildTabViewAt(your_index).setEnabled(false);

如果你想关闭标签部件整体,那么:

If you want to disable tab widget in overall, then:

// tabWidget = ... (get TabWidget)    
tabWidget.setEnabled(false);

阅读SDK帮助参考文献:

Read SDK Help for references:

  • TabHost
  • TabWidget

这篇关于如何禁用Android的屏幕选项卡?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆