- android
- android.accessibilityservice
- android.accounts
- android.content
- android.database.sqlite
- android.graphics
- android.location
- android.media
- android.net
- android.os
- android.text
- android.view
- android.view.inputmethod
- android.widget
- AbsListView
- AbsoluteLayout
- AbsSeekBar
- AbsSpinner
- AdapterView
- AnalogClock
- BaseAdapter
- BaseExpandableListAdapter
- Button
- CheckBox
- CheckedTextView
- Checkable
- Chronometer
- CompoundButton
- CursorAdapter
- CursorTreeAdapter
- DatePicker
- DialerFilter
- DigitalClock
- EditText
- Filter
- Filter.FilterListener
- Filter.FilterResults
- ExpandableListAdapter
- Filterable
- Gallery
- Gallery.LayoutParams
- GridView
- GridLayout
- RadioGroup
- ImageView
- HorizontalScrollView
- ImageButton
- ImageSwitcher
- FilterQueryProvider
- ListAdapter
- ListView
- MediaController
- QuickContactBadge
- RadioButton
- RatingBar
- RelativeLayout
- RemoteViews
- ResourceCursorAdapter
- ResourceCursorTreeAdapter
- Scroller
- ScrollView
- SearchView
- SeekBar
- SeekBar.OnSeekBarChangeListener
- SimpleAdapter
- SimpleCursorAdapter
- SimpleCursorTreeAdapter
- SimpleExpandableListAdapter
- SlidingDrawer
- Spinner
- SpinnerAdapter
- WrapperListAdapter
- TabHost
- TabHost.TabSpec
- TextView
- TimePicker
- Toast
- TableLayout
- TableRow
- TableRow.LayoutParams
- TabWidget
- TextSwitcher
- ToggleButton
- TwoLineListItem
- VideoView
- ViewAnimator
- ViewFlipper
- ViewSwitcher
- ZoomButtonsController
- ZoomButton
- ZoomControls
- dalvik.system
TabHost.TabSpec
TabHost.TabSpec
翻译时间:2010-11-25
版本:Android 2.3 r1
结构
继承关系
public class TabHost.TabSpec extends Object
java.lang.Object
android.widget.TabHost.TabSpec
类概述
每个选项卡都有一个选项卡指示符,内容和 tag 标签用于跟踪。这种生成器可以帮助从这些选项中做出选择。针对选项卡的指示符,你可以选择:
1) 设置一个标题
2) 设置一个标题和图标
针对选项卡的内容,你可以选择:
1) 视图的 ID
2)TabHost.TabContentFactory 创建的视图内容
3) 加载 Activity 的 Intent 对象
公共方法
public String getTag ()
(译者注:获取 tag 标签字符串)
public TabHost.TabSpec setContent (int viewId)
为选项卡的内容指定视图的 ID
(译注:即设定选项卡内容的视图)
public TabHost.TabSpec setContent (Intent intent)
指定一个加载 activity 的 Intent 对象作为选项卡内容
public TabHost.TabSpec setContent (TabHost.TabContentFactory contentFactory)
指定一个 TabHost.TabContentFactory 用于创建选项卡的内容
public TabHost.TabSpec setIndicator (CharSequence label)
指定一个标签作为选项卡指示符
public TabHost.TabSpec setIndicator (View view)
指定一个视图作为选项卡指示符
public TabHost.TabSpec setIndicator (CharSequence label, Drawable icon)
为选项卡指示符指定一个标签和图标
补充
文章链接
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论