아프리카tv 어플처럼
메인 페이지에서 시작 버튼을 누르면 다음 화면으로 넘어가게 만들고있습니다
첫번째 페이지는
Button startbtn = (Button) findViewById(R.id.startbtn);
startbtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
Intent intent = new Intent(getApplicationContext(),
tabActivity.class);
startActivity(intent);
}
});
위와같이 인텐트를 이용해 다음페이지로 넘겨줫구요
다음페이지에선 tabhost를 사용할예정입니다..
public class tabActivity extends TabActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
TabHost mtabhost = getTabHost();
mtabhost.addTab(mtabhost.newTabSpec("tag1").setIndicator("첫번째")
.setContent(R.id.linear1));
mtabhost.addTab(mtabhost.newTabSpec("tag2").setIndicator("두번째")
.setContent(R.id.linear2));
mtabhost.addTab(mtabhost.newTabSpec("tag3").setIndicator("세번째")
.setContent(R.id.linear3));
mtabhost.addTab(mtabhost.newTabSpec("tag4").setIndicator("네번째")
.setContent(R.id.linear4));
}
}