Android7.0中文文档(API)--- TabHost
来源:互联网 发布:网络小黄金骗局 编辑:程序博客网 时间:2024/05/16 12:46
完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/TabHost.html
TabHost
public class TabHost
extendsFrameLayout
implements ViewTreeObserver.OnTouchModeChangeListener
Container for a tabbed window view. This object holds two children: a set of tab labels that the user clicks to select a specific tab, and a FrameLayout object that displays the contents of that page. The individual elements are typically controlled using this container object, rather than setting values on the child elements themselves.
一个选项卡窗口视图的容器。此对象包含2个子项:用户点击选择的一组选项卡标签,和一个FrameLayout对象,其显示了页面的内容。各个的元素通常使用这个容器对象来控制,而不是在子元素本身上设置值。
摘要
嵌套类
interface
TabHost.OnTabChangeListener
Interface definition for a callback to be invoked when tab changed
回调接口定义,其在选项卡改变时调用的的
interface
TabHost.TabContentFactory
Makes the content of a tab when it is selected.
当选项卡被选择时,产生它的内容。
class
TabHost.TabSpec
A tab has a tab indicator, content, and a tag that is used to keep track of it.
选项卡有一个选项卡指示器,内容和一个用来跟踪它的标签。
继承XML属性
android.widget.FrameLayout
android.view.ViewGroup
android.view.View
继承常量
android.view.ViewGroup
android.view.View
继承字段
android.view.View
Public构造方法
TabHost(Context context)
TabHost(Context context, AttributeSet attrs)
TabHost(Context context, AttributeSet attrs, int defStyleAttr)
TabHost(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public方法
void
addTab(TabHost.TabSpec tabSpec)
Add a tab.
添加一个选项卡。
void
clearAllTabs()
Removes all tabs from the tab widget associated with this tab host.
从与此TabHost相关联的选项卡控件中移除所有的选项卡。
boolean
dispatchKeyEvent(KeyEvent event)
Dispatch a key event to the next view on the focus path.
向焦点路径上的下一个视图派发一个KeyEvent。
void
dispatchWindowFocusChanged(boolean hasFocus)
Called when the window containing this view gains or loses window focus.
当包含此视图的窗口获得或失去焦点时调用。
CharSequence
getAccessibilityClassName()
Return the class name of this object to be used for accessibility purposes.
返回此对象的类名,用于辅助功能目的。
int
getCurrentTab()
Returns the current tab.
返回当前的选项卡。
String
getCurrentTabTag()
Returns the tag for the current tab.
返回当前选项卡的标签。
View
getCurrentTabView()
Returns the view for the current tab.
返回当前选项卡的视图。
View
getCurrentView()
FrameLayout
getTabContentView()
Get the FrameLayout which holds tab content
获取包含选项卡内容的FrameLayout
TabWidget
getTabWidget()
TabHost.TabSpec
newTabSpec(String tag)
Creates a new TabHost.TabSpec
associated with this tab host.
创建一个与此TabHost相关联的一个新的TabHost.TabSpec
。
void
onTouchModeChanged(boolean isInTouchMode)
Callback method to be invoked when the touch mode changes.
回调方法,当触摸模式改变时调用。
void
setCurrentTab(int index)
void
setCurrentTabByTag(String tag)
Sets the current tab based on its tag.
设置这个标签的选项卡为当前选项卡。
void
setOnTabChangedListener(TabHost.OnTabChangeListener l)
Register a callback to be invoked when the selected state of any of the items in this list changes
注册一个回调,当此列表中的任何项的选择状态发生改变时调用。
void
setup()
Call setup() before adding tabs if loading TabHost using findViewById().
如果使用findViewById()来加载TabHost,则在添加选项卡之前,首先调用setup()。
void
setup(LocalActivityManager activityGroup)
If you are using setContent(android.content.Intent)
, this must be called since the activityGroup is needed to launch the local activity.
如果你使用setContent(android.content.Intent)
,则必须调用此方法,因为activityGroup需要启动局部activity。
继承方法
完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/TabHost.html
- Android7.0中文文档(API)--- TabHost
- Android7.0中文文档(API)--- FrameLayout
- Android7.0中文文档(API)--- DatePicker
- Android7.0中文文档(API) --- MediaController
- Android7.0中文文档(API) -- TimePicker
- Android7.0中文文档(API)-- ViewAnimator
- Android7.0中文文档(API)--- AbsoluteLayout
- Android7.0中文文档(API) -- Switch
- Android7.0中文文档(API) --- ToggleButton
- Android7.0中文文档(API) --- RadioButton
- Android7.0中文文档(API) --- CheckedTextView
- Android7.0中文文档(API) -- ScrollView
- Android7.0中文文档(API)-- DigitalClock
- Android7.0中文文档(API)-- TextClock
- Android7.0中文文档(API)---Chronometer
- Android7.0中文文档(API)--- AdapterView
- Android7.0中文文档(API)--- AdapterViewAnimator
- Android7.0中文文档(API)--- DialerFilter
- C# 第三方类库使用目录
- ubuntu 16.04 安装 shadowsocks-qt5 并配置 pac 全局代理 转自核果网
- Java中的并发知识点梳理
- Qt之pro配置详解
- java最实用newFixedThreadPool线程池
- Android7.0中文文档(API)--- TabHost
- openstack-network-instances
- django中出现莫名其妙奇妙的错误,发现是python版本的问题
- python中序列、列表的使用
- Spark integration ElasticSearch
- caffe添加新层教程
- opencv在输出不同文件格式输出的时候文件空间的大小不一样
- cmake学习
- C#控制格式符