Ok , My manifest :
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 package="com.ikomobi.test"
4 android:versionCode="1"
5 android:versionName="1.0">
6 <application android:icon="@drawable/icon" android:label="@string/app_name">
7
8
9 <activity android:name=".Start"
10 android:label="@string/app_name">
11 <intent-filter>
12 <action android:name="android.intent.action.MAIN" />
13 <category android:name="android.intent.category.LAUNCHER" />
14 </intent-filter>
15 </activity>
16
17 <activity android:name=".Test1"
18 android:screenOrientation="portrait">
19 <intent-filter>
20 <action android:name="android.intent.action.VIEW" />
21 </intent-filter>
22 </activity>
23
24 </application>
25</manifest>
I have two activities : Start and Test1 , there's a Button on Start which load Test1 and that's all
1public class Start extends Activity implements OnClickListener{
2
3 Button next;
4
5 /** Called when the activity is first created. */
6 @Override
7 public void onCreate(Bundle savedInstanceState) {
8 super.onCreate(savedInstanceState);
9 setContentView(R.layout.main);
10 next = (Button) findViewById(R.id.Button01);
11 next.setOnClickListener(this);
12 }
13
14 @Override
15 public void onClick(View arg0) {
16 if( arg0 == next ){
17 Intent intent = new Intent(this,Test1.class);
18 startActivity(intent);
19
20 }
21 }
22}
This is the code for Test1 :
1public class Test1 extends Activity implements OnClickListener{
2
3 public Button next;
4
5 /** Called when the activity is first created. */
6 @Override
7 public void onCreate(Bundle savedInstanceState) {
8 super.onCreate(savedInstanceState);
9 setContentView(R.layout.test1);
10 next = (Button) findViewById(R.id.Button01);
11 }
12
13 @Override
14 public void onClick(View v) {
15 // TODO Auto-generated method stub
16
17 }
18
19
20}
All I want is I want to quit the application (with the button HOME) and come back exactly at the same place (for example , if i was at B , i want to restart at B and keep the activity A)
I hope i'm clear (shy)
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.