18高级控件
来源:互联网 发布:core java第十版中文 编辑:程序博客网 时间:2024/05/16 05:06
a、TabHost
//*.xml
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:orientation="vertical"
android:id="@+id/ll_main_tab"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget
android:id="@android:id/tabs"
android:background="@drawable/ic_launcher"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<FrameLayout
android:gravity="center"
android:id="@android:id/tabcontent"
android:fadingEdge="none"
android:fadingEdgeLength="0.0dip"
android:layout_width="fill_parent"
android:layout_height="0.0dip"
android:layout_weight="1.0">
</FrameLayout>
</LinearLayout>
</TabHost>
//*Activity.java
package hy.com;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
public class *Activity extends TabActivity {
private TabHost tabHost;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.*);
tabHost = this.getTabHost();
tabHost.addTab(tabHost.newTabSpec("three").setIndicator("c").setContent(R.id.tabFirst));
tabHost.addTab(tabHost.newTabSpec("two").setIndicator("b").setContent(new Intent().setClass(this, test.class)));
tabHost.setCurrentTab(0);
}
}
- 18高级控件
- 高级控件
- 高级控件
- [C#][控件]高级控件
- Gridview控件高级技巧
- j2me高级控件总结
- Gridview控件高级技巧
- Grid控件高级应用
- 高级的TreeView控件
- 高级进度条控件源码
- Swing高级控件
- windows窗体高级控件
- c#高级控件
- ASP.net高级控件
- Android高级控件
- ListView控件高级应用
- UI高级控件
- ASP.NET高级控件
- 数字信号处理的学习资源
- 堆排序和优先队列【最大堆】
- 图像傅立叶变换
- 干货分享!12款响应式的移动网站模板免费下载
- xcode 下载失败,需要升级 iTunes
- 18高级控件
- VC++以及VS个版本比较 及 C++编译器比较
- 17本机号码
- Service学习——第一篇(创建简单的Service)
- 《数据结构实验1》--二叉树
- 16弹出对话
- Effective C++:条款44:将与参数无关的代码抽离template
- 堆排序和优先队列【最小堆】
- 15短信电话