Share via


Activity.ShouldUpRecreateTask(Intent) Method

Definition

Returns true if the app should recreate the task when navigating 'up' from this activity by using targetIntent.

[Android.Runtime.Register("shouldUpRecreateTask", "(Landroid/content/Intent;)Z", "GetShouldUpRecreateTask_Landroid_content_Intent_Handler")]
public virtual bool ShouldUpRecreateTask (Android.Content.Intent? targetIntent);
[<Android.Runtime.Register("shouldUpRecreateTask", "(Landroid/content/Intent;)Z", "GetShouldUpRecreateTask_Landroid_content_Intent_Handler")>]
abstract member ShouldUpRecreateTask : Android.Content.Intent -> bool
override this.ShouldUpRecreateTask : Android.Content.Intent -> bool

Parameters

targetIntent
Intent

An intent representing the target destination for up navigation

Returns

true if navigating up should recreate a new task stack, false if the same task should be used for the destination

Attributes

Remarks

Returns true if the app should recreate the task when navigating 'up' from this activity by using targetIntent.

If this method returns false the app can trivially call #navigateUpTo(Intent) using the same parameters to correctly perform up navigation. If this method returns false, the app should synthesize a new task stack by using TaskStackBuilder or another similar mechanism to perform up navigation.

Java documentation for android.app.Activity.shouldUpRecreateTask(android.content.Intent).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to