구글링을 해본결과
선택된 탭의 색깔(2.1에선 기본이 Grey)을 tabHost.getTabWidget().setBackgroundColor(color.black);을 이용하여
바꾸는 소스들이 많이 보이는데 현재 소스에서 어디에 어떻게 저 소스를 적용시켜야 할지 잘 모르겠습니다...
답변부탁드려요!
package com.windev.bookmarkroid;
import android.R.color;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;
import android.graphics.Color;
public class Bookmarkroid extends TabActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.bookmarkroid);
Resources res = getResources();
final TabHost tabHost = getTabHost();
tabHost.setBackgroundColor(color.white);
tabHost.getTabWidget().setBackgroundColor(color.black);
TabHost.TabSpec spec;
Intent intent;
intent = new Intent().setClass(this, Now.class);
spec = tabHost.newTabSpec("now").setIndicator("Now",
res.getDrawable(R.drawable.nowtab))
.setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, Books.class);
spec = tabHost.newTabSpec("books").setIndicator("Books",
res.getDrawable(R.drawable.bookstab))
.setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, Share.class);
spec = tabHost.newTabSpec("share").setIndicator("Share",
res.getDrawable(R.drawable.sharetab))
.setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, Setting.class);
spec = tabHost.newTabSpec("setting").setIndicator("Setting",
res.getDrawable(R.drawable.settingtab))
.setContent(intent);
tabHost.addTab(spec);
}
}




Tab버튼의 배경이 아니라는 말입니다. 위의 소스에서 Tab 버튼은 이미 배경이 기본 타입으로 결정 나 있습니다.
TabWidget은 Tab 버튼들이 모여있는 영역의 LinearLayout이라고 보면 되니까요...
Tab Button 자체에 대한 배경을 수정하시려면 setIndicator 함수에 View를 만들어서 넣어주셔야 합니다.