아이스크림샌드위치 버전에서만 TabActivity안에 있는 클릭 리스너가 작동이 되지 않습니다.
TabActivity 는 3개의 탭으로 구성되어 있습니다.
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<LinearLayout android:id="@+id/opt_header"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout android:id="@+id/opt_detail"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<LinearLayout android:id="@+id/opt_detail_sub"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
.............................
final TabHost mTab = getTabHost();
TabHost.TabSpec spec;
// 첫 번째 탭
spec = mTab.newTabSpec("tag_header");
spec.setIndicator("탭1",getResources().getDrawable( R.drawable.list_header ) );
spec.setContent(R.id.opt_header);
mTab.addTab(spec);
// 두 번째 탭
spec = mTab.newTabSpec("tag_detail");
spec.setIndicator("탭2",getResources().getDrawable( R.drawable.list_detail ) );
spec.setContent(R.id.opt_detail );
mTab.addTab(spec);
//세번째 탭
spec = mTab.newTabSpec("tag_detail");
spec.setIndicator("탭3",getResources().getDrawable( R.drawable.list_detail ) );
spec.setContent(R.id.opt_detail_sub );
mTab.addTab(spec);
/*********************** 날짜시간 ********************/
sDatatime_search.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
showDialog(DATE_DIALOG_ID);
}
});
날짜 시간을 선택하는 버튼은 탭1에 있습니다.
해당 탭1 내용중 날짜선택 버튼을 클릭하면 클릭액션이 작동하지 않습니다.
탭1과 탭2에 있는 버튼 및 어떤 컨트롤도 아이스크림샌드위치 버전에서는 클릭 리스너가 작동하지 않습니다.
이상하게도 탭3안에 있는 버튼은 작동되더라고요...
답변 부탁드립니다.
오늘 하루종일 찾아보고 있는데 해답을 아직 얻지 못했습니다. 부탁드립니다.