package com.looptek.com;123123 123123
import android.app.TabActivity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.widget.TabHost; import android.widget.TabHost.OnTabChangeListener;
public class maintab extends TabActivity { /** Called when the activity is first created. */ private TabHost tabHost; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); tabHost = getTabHost(); Intent mtab1 = new Intent(this,test.class); tabHost.addTab(tabHost.newTabSpec("tab1") .setIndicator(getString(R.string.str_tablist0), getResources().getDrawable(R.drawable.tabmap3)) .setContent(new Intent(this, test.class))); tabHost.addTab(tabHost.newTabSpec("tab2") .setIndicator(getString(R.string.str_tablist1), getResources().getDrawable(R.drawable.tabmsg)) .setContent(new Intent(this, cool.class))); tabHost.addTab(tabHost.newTabSpec("tab3") .setIndicator(getString(R.string.str_tablist2), getResources().getDrawable(R.drawable.tabmap2)) .setContent(new Intent(this,mapMain.class))); tabHost.addTab(tabHost.newTabSpec("tab4") .setIndicator(getString(R.string.str_tablist3), getResources().getDrawable(R.drawable.tabtree)) .setContent(new Intent(this,WebViewClass.class))); tabHost.setCurrentTab(1); tabHost.setOnTabChangedListener(new OnTabChangeListener() { // @Override public void onTabChanged(String arg0) { if (arg0.equals("tab1")) { } } }); } }
CH01 簡介篇
- 02 Android Tutorial, Begin android 4.0.x..
- 受保護的內容: android app, best anti-virus app..
- Android M 新版本 2015 第三季正式釋出..
- Android 讀者專區
- Google Apps Marketplace
- PowenKo,Android Tutorial 004,Begin , An..
- 對於完全不了解app 的幾個常見問答,和建議的書籍..
- android 語言, 教學文件 021-1-1, UI, 使用設計 Title..
- android, ui, dialog
- Android, ui, Listview, 修掉 選取時背景變成黑色的問題..
- android, ui, tab
- Android,UI 在程式中即時加上其他的UI..
- android,ui,Working with the Android Cale..
- android-ProgressDialog 不能在 TabActivity 執..
- hide keyboard
- ui, thread, Using threads and ProgressDi..