今天要处理一个圆角效果用到了下面
tab = tabs.newTabSpec("tab_Busquedas");
tab.setContent(new Intent().setClassName("com.grapp", "com.grapp.homes").putExtras(bundle));
tab.setIndicator(null,null);
tabs.addTab(tab);
//设置一个圆角图片
tabs.getTabWidget().getChildAt(0).setBackgroundResource(R.drawable.mytab_roundedcorners);
mytab_roundedcorners是一个selector.在里面你可以引用一个图片
如
<drawable name="rounded_tab">标签:圆角,mytab,效果,tabs,tab,android,null From: https://blog.51cto.com/u_5454003/6131815
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="3dip" android:color="@android:color/white" />
<solid android:color="@android:color/white" />
<corners android:bottomRightRadius="0.1dip"
android:bottomLeftRadius="0.1dip" android:topLeftRadius="15dip"
android:topRightRadius="15dip" />
</shape>