3G前沿开发 android 1.tabHost卡片效果 //1.填充 tabHost=getTabHost(); LayoutInflater.from(this).inflate(R.layout.main, tabHost.getTabContentView(),true); //2.卡片设置 tabHost.addTab(tabHost .newTabSpec("tab_meitu") .setIndicator("美图", getResources().getDrawable(R.drawable.picture)) .setContent(R.id.tab_meitu)); tabHost.addTab(tabHost .newTabSpec("tab_favorite") .setIndicator("收藏", getResources().getDrawable(R.drawable.star_fav_empty)) .setContent(new Intent(this,FavoriteActivity.class))); // tabHost.addTab(tabHost // .newTabSpec("tab_settings") // .setIndicator("设置", getResources().getDrawable(R.drawable.wrench_plus_2)) // .setContent(R.id.tab_settings)); // tabHost.setBackgroundDrawable(getResources().getDrawable(R.drawable.bg2)); tabHost.setBackgroundDrawable(getResources().getDrawable(R.drawable.metal_bg)); 待续。。该休息了。。 效果图 也不知道看起来怎么样。反正调了几个小时出这么个效果。。