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

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

问题描述

你好,你能告诉我如何在 android 代码的 UI 中禁用选项卡..(eclair 代码)

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

推荐答案

如果你的意思是禁用 TabWidget 上的一个选项卡按钮,那么试试这个代码:

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:

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

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