本文介绍了如何禁用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屏幕中的标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!