¡@

Home 

2014/10/16 ¤W¤È 08:25:36

android Programming Glossary: tabs.newtabspec

Example of using Android tabs with Views instead of Activities?

http://stackoverflow.com/questions/2970844/example-of-using-android-tabs-with-views-instead-of-activities

question I think in the .setContent method of each tab you pass in the view you wish to use TabHost.TabSpec spec1 tabs.newTabSpec tag1 spec1.setContent R.id.AnalogClock01 spec1.setIndicator Analog Clock Here's an example I found awhile back xml version.. setContentView R.layout.main TabHost tabs TabHost findViewById R.id.TabHost01 tabs.setup TabHost.TabSpec spec1 tabs.newTabSpec tag1 spec1.setContent R.id.AnalogClock01 spec1.setIndicator Analog Clock tabs.addTab spec1 TabHost.TabSpec spec2 tabs.newTabSpec.. tag1 spec1.setContent R.id.AnalogClock01 spec1.setIndicator Analog Clock tabs.addTab spec1 TabHost.TabSpec spec2 tabs.newTabSpec tag2 spec2.setContent R.id.DigitalClock01 spec2.setIndicator Digital Clock tabs.addTab spec2 share improve this answer..

How to change tab style in Android?

http://stackoverflow.com/questions/3029074/how-to-change-tab-style-in-android

Android TabHost - Activities within each tab

http://stackoverflow.com/questions/3103062/android-tabhost-activities-within-each-tab

Color.DKGRAY txtTabInfo.setGravity Gravity.CENTER_HORIZONTAL Gravity.TOP txtTabInfo.setHeight 39 spec tabs.newTabSpec tabInfo spec.setContent R.id.tabInfo spec.setIndicator txtTabInfo tabs.addTab spec Maps txtTabMap new TextView this txtTabMap.setText.. Color.DKGRAY txtTabMap.setGravity Gravity.CENTER_HORIZONTAL Gravity.TOP txtTabMap.setHeight 39 spec tabs.newTabSpec tabMap spec.setContent R.id.tabMap spec.setIndicator txtTabMap tabs.addTab spec tabs.setCurrentTab 0 tabs.setOnTabChangedListener..