안녕하십니까
동아리 홈피 제작과 어플을 만들고 어플에 GCM을 올리고 싶어서 공부 하고있는 평범한 대학생 입니다.
GCM을 기본으로 두고 일단 어플 제작을 해버려서
메인 화면이 regid와 개인정보 조금 적어서 등록버튼을 누르는 메인 화면이 있습니다. 이 화면을 activity_register.xml로 두겠습니다.
이화면이 어플을 실행시켯을때 뜨는 기본 화면이구요
등록 버튼을 눌렀을때 현재 상태를 텍뷰로 찍어주는 activity_main.xml이 있구요
이제 웹뷰 즉 홈페이지를 보여주기위해 웹뷰소스를 추가하고 에러 다잡았구요.
그런데 어플을 실행시켰을때 뜨는 메인화면이 아직 그대로 activity_register 입니다.
여기서 질문
1. 어플 실행시 처음 뜨는 화면을 main 즉 웹뷰로 두고 싶습니다.
2. 메뉴 버튼을 누르면 나타나는 메뉴를 만들고 그 메뉴에 설정 탭을 만들어서 activity_register.xml을 관리 하고 싶습니다
이렇게 설정하려면 어느부분을 건드려야 하나요??
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="#ffffff" >
<TextView android:id="@+id/lblMessage"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="16dip"
android:layout_margin="10dip"
android:textColor="#000000"/>
</LinearLayout>
activity_main.xml 레이아웃
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="이름 :"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_marginTop="20dip"/>
<EditText android:id="@+id/txtName"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:layout_marginBottom="20dip"/>
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="이메일 : "
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"/>
<EditText android:id="@+id/txtEmail"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:layout_marginBottom="20dip"/>
<Button
android:id="@+id/btnRegister"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:text="Register" />
</LinearLayout>
activity_register_xml 레이아웃
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
</LinearLayout>
main.xml 레이아웃
소스가 길어서 죄송합니다 ㅠㅠ 일단 레이아웃 부분만 올렷구요
MainActivity.java 부분에 메인 액티비티 밑 웹뷰 부분이 올려저 있습니다.
mainactivity.java 부분에서 설정해야 하는거면 방법좀 알려 주시면 감사하겠습니다