Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何更改android tabhost中选项卡的样式?_Android_Android Tabhost_Android Style Tabhost - Fatal编程技术网

如何更改android tabhost中选项卡的样式?

如何更改android tabhost中选项卡的样式?,android,android-tabhost,android-style-tabhost,Android,Android Tabhost,Android Style Tabhost,我想在androidtabhost中更改选项卡的样式,我不想只更改背景颜色,而是更改整个样式(例如制作圆角) 在TabHost中,您可以放置按钮或具有首选样式的任何其他小部件,即使是圆角 Button myButton = new Button(this); myButton.setText("My Button"); myButton.setBackgroundColor(Color.TRANSPARENT); myButton.setCompoundDrawablesWithIntrinsi

我想在android
tabhost
中更改选项卡的样式,我不想只更改背景颜色,而是更改整个样式(例如制作圆角)

TabHost
中,您可以放置
按钮
或具有首选样式的任何其他小部件,即使是圆角

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);