A- > B -> C -> D
이렇게 화면전환이 필요해서 인텐트를 써서 이전버튼, 다음버튼과 함께 구현하려고 하는데요.
문제는 처음 메인화면에서 A로 넘어가고 B까지로도 잘넘어가지는데 C로 넘어가려고 하면 잠시 화면이 멈추었다가
A로 다시 넘어옵니다. 뭐가 문제인지 잘 모르겠어요 ㅠㅠ 고수님들 도와주세요.
메니페스트
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.date.datemaker"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.date.datemaker.MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/app_id" />
<activity android:name="com.facebook.LoginActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<activity android:name="LoginActivity_facebook"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
<activity android:name="Intro1"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
<activity android:name="Intro2"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
<activity android:name="Intro3"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
<activity android:name="Intro4"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
</application>
</manifest>
액티비티
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Intro1 extends Activity{
Button nextbtn1;
Button beforebtn1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.intro1);
nextbtn1 = (Button)findViewById(R.id.nextbtn1);
beforebtn1 =(Button)findViewById(R.id.beforebtn1);
nextbtn1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent nextintent1 = new Intent(Intro1.this,Intro2.class);
startActivity(nextintent1);
}
});
beforebtn1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent beforeintent1 = new Intent(Intro1.this, MainActivity.class);
startActivity(beforeintent1);
}
});
}
}
XML
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/intro1"
android:orientation="vertical" >
<Button
android:id="@+id/nextbtn1"
style="?android:attr/buttonStyleSmall"
android:layout_width="90dp"
android:layout_height="30dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="86dp"
android:layout_marginRight="21dp"
android:background="@drawable/intronext"
android:text="" />
<Button
android:id="@+id/beforebtn1"
style="?android:attr/buttonStyleSmall"
android:layout_width="90dp"
android:layout_height="30dp"
android:layout_alignBaseline="@+id/nextbtn1"
android:layout_alignBottom="@+id/nextbtn1"
android:layout_alignParentLeft="true"
android:layout_marginLeft="22dp"
android:background="@drawable/introbefore"
android:text="" />
</RelativeLayout>
intro 2, 3, 4도 위와 비슷하구요(인텐트에서 넘어갈때 .this와 .class부분과 intent명, 버튼이름이 다름-> 혹시나 해서 바꿔봤어요 ㅠㅠ 문제가 뭘까요?!)
고수님들 제발 도와주세요