[英]How to change the style of the tab in android tabhost?
我想更改android tabhost
选项卡的样式,我不想仅更改背景颜色,而是更改整个样式(例如,制作圆角)。
In TabHost
you can put a Button
or any other widget with a preferred style, even with rounded corners 在
TabHost
您可以放置具有首选样式的Button
或任何其他小部件,即使带有圆角
Button myButton = new Button(this);
myButton.setText("My Button");
myButton.setBackgroundColor(Color.TRANSPARENT);
myButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.my_button_drawable_top, 0, 0);
TabHost.TabSpec myButtonTab = mTabHost.newTabSpec("tab1").setIndicator(myButton).setContent(intentPlayList);
mTabHost.addTab(myButtonTab);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.