1)可以使用android自带的方式,即传入按钮的图片Drawable,或者路径。
此种方式的按钮高度是自动根据比例来显示的。
Drawable dd = getResources().getDrawable(paramInt);
localTabSpec.setIndicator("",dd);
2)也可以自定义View,在xml文件中设计样式,在设置到Indicator里面。
如果需要按比例来显示按钮,则需要用代码控制,获取屏幕宽度等等。
localTabSpec.setIndicator(view);
此种方式的按钮高度是自动根据比例来显示的。
Drawable dd = getResources().getDrawable(paramInt);
localTabSpec.setIndicator("",dd);
2)也可以自定义View,在xml文件中设计样式,在设置到Indicator里面。
如果需要按比例来显示按钮,则需要用代码控制,获取屏幕宽度等等。
localTabSpec.setIndicator(view);