I have 3 activities: Home(Base activity) with
<activity
android:launchMode="singleTop"
android:name="com.Home"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Other two activites: Activity1 and Activity2
with theme android:theme="@android:style/Theme.Translucent"
can be called from each other or from home.
They always return to home onBackpress() it is override
intent.setClass(this, Home.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
when activity1 is called from activity2
intent.setClass(this, ACtivity2.class);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
its onResume is called but cannot be seen Is there any solution?
I want only single instance of Activity in stack.
Requirements: Activity1 and Activity2 should once created should never be destroyed(They should be always called from history) until Home is called.
Help me out. Thanks in Advance.