일단 소스는
-------------------------------TEST.java------------------------------------------------
public class TEST extends TabActivity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TabHost tabHost = getTabHost();
Drawable a = getResources().getDrawable(R.drawable.a);
Drawable b = getResources().getDrawable(R.drawable.b);
Drawable c = getResources().getDrawable(R.drawable.c);
Drawable d = getResources().getDrawable(R.drawable.d);
tabHost.addTab(tabHost.newTabSpec("Aa").setIndicator("A", a).setContent(new Intent(this, TEST_A.class)));
tabHost.addTab(tabHost.newTabSpec("Bb").setIndicator("B", b).setContent(new Intent(this, TEST_B.class)));
tabHost.addTab(tabHost.newTabSpec("Cc").setIndicator("C", c).setContent(new Intent(this, TEST_C.class)));
tabHost.addTab(tabHost.newTabSpec("Dd").setIndicator("D", d).setContent(new Intent(this, TEST_D.class)));
}
}
-------------------------------TEST_A.java------------------------------------------------
public class TEST_A extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.otdp_list);
ArrayList<String> arGeneral = new ArrayList<String>();
arGeneral.add("김유신");
arGeneral.add("이순신");
arGeneral.add("강감찬");
arGeneral.add("을지문덕");
String[] arGeneral = {"김유신", "이순신", "강감찬", "을지문덕"};
ArrayAdapter<String> Adapter;
Adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, arGeneral);
ListView list = (ListView)findViewById(R.id.list_List);
list.setAdapter(Adapter);
}
}
--------------------------------list_List.xml-----------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView
android:id="@+id/list_List"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</ListView>
</LinearLayout>
-------------------------------------------------------------------------------
이렇게 3가지 파일이 있습니다.
나머지 소스는 건드리지 않았구요.
일단 탭뷰에서 A 버튼을 눌렀을 때 리스트 뷰가 나오도록 하려고 합니다.(B,C,D 버튼은 A가 해결되면 응용해서 하면 될듯)
근데 왜 에뮬에서
Sorry!
The application 테스트 (process ) has stopped unexpectedly. Please try again.
왜 이런 메시지가 뜨면서 실행이 안되는지요...
참고 서적으로는 "안드로이드 프로그래밍 정복" 책을 참고해서 만들고 있습니다.




manifest파일에 액티비티 등록 하셨나요?