Transparent activity in Resume does not display android

I have 3 events: 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>

The other two activities: Activity1 and Activity2

with the topic android:theme="@android:style/Theme.Translucent" can be called from each other or from home.

They always return to the main onBackpress () it overrides

intent.setClass(this, Home.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);

when action1 is called from activity2

intent.setClass(this, ACtivity2.class);
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);

its onResume is called, but it cannot be seen Is there any solution?

I want only one instance of Activity on the stack.

Requirements: Activity1 and Activity2 must be created must never be destroyed (they should always be called from history) until Home is called.

Help me. Thanks at Advance.

Visited it too

+5
source share
2 answers

, - , FLAG_ACTIVITY_CLEAR_TOP Home Activity.

,

, , . , , . , , ABCDE, D E ABC.

, 1 2 .

:

FLAG_ACTIVITY_RESET_TASK_IF_NEEDED FLAG_ACTIVITY_REORDER_TO_FRONT

AS,

, . reset, , ( ) , , FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET , .

+2

android:launchMode="singleinstance";
0

All Articles