TabHost.TabSpec spec = tabs.newTabSpec("rycxtab");
spec.setContent(R.id.rycxtab);
spec.setIndicator("测试1",getResources().getDrawable(R.layout.infosearch_stress));
tabs.addTab(spec);
spec = tabs.newTabSpec("wpcxtab");
spec.setContent(R.id.wpcxtab);
spec.setIndicator("测试2",getResources().getDrawable(R.layout.infosearch_query_aticle));
tabs.addTab(spec);
spec = tabs.newTabSpec("ajcxtab"); spec.setContent(R.id.ajcxtab);
spec.setIndicator("测试3",getResources().getDrawable(R.layout.infosearch_law_case));
tabs.addTab(spec);
spec = tabs.newTabSpec("jgcxtab");
spec.setContent(R.id.jgcxtab);
spec.setIndicator("测试4",getResources().getDrawable(R.layout.infosearch_institution));
tabs.addTab(spec);
tabs.setCurrentTab(0);
spec.setContent(R.id.rycxtab);
spec.setIndicator("测试1",getResources().getDrawable(R.layout.infosearch_stress));
tabs.addTab(spec);
spec = tabs.newTabSpec("wpcxtab");
spec.setContent(R.id.wpcxtab);
spec.setIndicator("测试2",getResources().getDrawable(R.layout.infosearch_query_aticle));
tabs.addTab(spec);
spec = tabs.newTabSpec("ajcxtab"); spec.setContent(R.id.ajcxtab);
spec.setIndicator("测试3",getResources().getDrawable(R.layout.infosearch_law_case));
tabs.addTab(spec);
spec = tabs.newTabSpec("jgcxtab");
spec.setContent(R.id.jgcxtab);
spec.setIndicator("测试4",getResources().getDrawable(R.layout.infosearch_institution));
tabs.addTab(spec);
tabs.setCurrentTab(0);
解决方案 »
- Android自定义View的一个问题
- button鼠标点击后焦点哪去了
- 请问把Dialog声明为final有什么好处?
- android 测试SD卡读写速度 的问题(纠结好久的问题,实在解决不了了
- 下拉框问题
- WebView访问wiki时自动重定向,该怎么解决
- 请教大家一个入门的问题
- 怎么让listview无法选中,listview中的button可以被选中
- 请问各位,为什么的我ecplise中只有android 4.4版的模拟器,我想装低版本的,比如2.2的,应该怎么弄呢?
- 各位前辈,帮忙分析这段java代码,签名检验如何跳过?
- 如何在状态栏上增加一个截屏按钮,截屏具体实现方法?
- 怎么实现下拉框效果!
应该是:getResources().getDrawable(R.id.infosearch_stress);几个选项卡都有问题哦!!
楼主看看吧!!