What's the best way to hide a tab in a TabNavigator?
来源:互联网 发布:淘宝怎么规定收货时间 编辑:程序博客网 时间:2024/05/29 03:14
问:
I'd like to conditionally hide a tab in a TabNavigator. It seems that setting visible doesn't work properly (presumably because this is how the TabNavigator hides the tabs that aren't currently selected).
What's the right way to do this?
答案:
You can do this by making use of TabNavigator's getTabAt() method which returns the Button that makes up the visual tab. You can then set that Button's visible property. It's a little tricky to get this setup with a bindings, but it's doable.
You could also consider just disabling the tab instead, which you can do by setting enabled on the corresponding TabNavigator child (for which visible didn't work).
原文:http://stackoverflow.com/questions/830977/whats-the-best-way-to-hide-a-tab-in-a-tabnavigator
- What's the best way to hide a tab in a TabNavigator?
- 005:What's the best way to iterate over the items in a HashMap?
- What is the best way to implement a heartbeat in C++ to check for socket connectivity?
- What's the easiest way to call a function every 5 seconds in jQuery?
- What is the best way to create a good interface to an abstraction?
- The best way to fix a bug
- What is the best way to calculate a checksum for a file that is on my machine?
- ADF: The best way to indicate for records in a table the existence of details
- The best way to get unique elements of a list in Python
- hide a service in the service tab隐藏服务
- you must specify a way to create the tab indicator.
- A smart way to count the ONEs in an integer's binary form representation
- Android - What's the best way to share data between activities?
- What is the best way to paginate results in SQL Server
- How to show/hide a control in the Column's DataItemTemplate based on the value of another control
- How to hide/show tab bar of a view with a navigation bar in iOS?
- A easy way to save the filelist in linux
- A better way to shutdown the thread pool in Java
- 压缩JS和CSS常用的工具
- 位运算
- mac终端中svn的使用(非常简单)
- Project Euler16.求2^1000的各位数之和
- getHibernateTemplate().find()方法
- What's the best way to hide a tab in a TabNavigator?
- 飞鸽传书2010绿色版
- log4j.properties配置详解
- 非常不错的编程技术教程
- c++强制类型转换:dynamic_cast、const_cast 、static_cast、reinterpret_cast
- USES_CONVERSION
- AS3中String转换成Boolean
- mcafee 8.5 允许foxmail 等工具发送邮件(新解)
- NESMA 功能点估算方法值得关注!