語言

Intent.CreateChooser 方法

定義

多載

名稱 Description
CreateChooser(Intent, ICharSequence)

方便功能用於建立 ActionChooser 意圖。

CreateChooser(Intent, String)

方便功能用於建立 ActionChooser 意圖。

CreateChooser(Intent, ICharSequence, IntentSender)

方便功能用於建立 ActionChooser 意圖。

CreateChooser(Intent, String, IntentSender)

方便功能用於建立 ActionChooser 意圖。

CreateChooser(Intent, ICharSequence)

方便功能用於建立 ActionChooser 意圖。

[Android.Runtime.Register("createChooser", "(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;", "")]
public static Android.Content.Intent? CreateChooser(Android.Content.Intent? target, Java.Lang.ICharSequence? title);
[<Android.Runtime.Register("createChooser", "(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;", "")>]
static member CreateChooser : Android.Content.Intent * Java.Lang.ICharSequence -> Android.Content.Intent

參數

target
Intent

使用者選擇要執行的活動的意圖。

title
ICharSequence

可選標題,僅在目標動作未ACTION_SEND或未ACTION_SEND_MULTIPLE時顯示於選擇器中。

傳回

回傳一個新的 Intent 物件,可以交 Context#startActivity(Intent) Context.startActivity() 給它,還有相關方法。

屬性

備註

方便功能用於建立 ActionChooser 意圖。

建立一個新的 ActionChooser 意圖,包裹給定的目標意圖,並可選擇提供職稱。 若目標意圖指定 GrantReadUriPermission 或 GrantWriteUriPermission,則這些旗標也會在回傳的選擇器意圖中設定,並適當地設定其 ClipData:若非空,則直接反映 ClipData ,或由 建構 Data出新的 ClipData。

Java 文件 android.content.Intent.createChooser(android.content.Intent, java.lang.CharSequence)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

CreateChooser(Intent, String)

方便功能用於建立 ActionChooser 意圖。

public static Android.Content.Intent? CreateChooser(Android.Content.Intent? target, string? title);
static member CreateChooser : Android.Content.Intent * string -> Android.Content.Intent

參數

target
Intent

使用者選擇要執行的活動的意圖。

title
String

可選標題,僅在目標動作未ACTION_SEND或未ACTION_SEND_MULTIPLE時顯示於選擇器中。

傳回

回傳一個新的 Intent 物件,可以交 Context#startActivity(Intent) Context.startActivity() 給它,還有相關方法。

備註

方便功能用於建立 ActionChooser 意圖。

建立一個新的 ActionChooser 意圖,包裹給定的目標意圖,並可選擇提供職稱。 若目標意圖指定 GrantReadUriPermission 或 GrantWriteUriPermission,則這些旗標也會在回傳的選擇器意圖中設定,並適當地設定其 ClipData:若非空,則直接反映 ClipData ,或由 建構 Data出新的 ClipData。

Java 文件 android.content.Intent.createChooser(android.content.Intent, java.lang.CharSequence)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

CreateChooser(Intent, ICharSequence, IntentSender)

方便功能用於建立 ActionChooser 意圖。

[Android.Runtime.Register("createChooser", "(Landroid/content/Intent;Ljava/lang/CharSequence;Landroid/content/IntentSender;)Landroid/content/Intent;", "", ApiSince=22)]
public static Android.Content.Intent? CreateChooser(Android.Content.Intent? target, Java.Lang.ICharSequence? title, Android.Content.IntentSender? sender);
[<Android.Runtime.Register("createChooser", "(Landroid/content/Intent;Ljava/lang/CharSequence;Landroid/content/IntentSender;)Landroid/content/Intent;", "", ApiSince=22)>]
static member CreateChooser : Android.Content.Intent * Java.Lang.ICharSequence * Android.Content.IntentSender -> Android.Content.Intent

參數

target
Intent

使用者選擇要執行的活動的意圖。

title
ICharSequence

可選標題,僅在目標動作未ACTION_SEND或未ACTION_SEND_MULTIPLE時顯示於選擇器中。

sender
IntentSender

選擇性 IntentSender 在做出選擇時會被呼叫。

傳回

回傳一個新的 Intent 物件,可以交 Context#startActivity(Intent) Context.startActivity() 給它,還有相關方法。

屬性

備註

方便功能用於建立 ActionChooser 意圖。

建立一個新的 ActionChooser 意圖,包裹給定的目標意圖,並可選擇提供職稱。 若目標意圖指定 GrantReadUriPermission 或 GrantWriteUriPermission,則這些旗標也會在回傳的選擇器意圖中設定,並適當地設定其 ClipData:若非空,則直接反映 ClipData ,或由 建構 Data出新的 ClipData。

來電者可選擇性地提供 , IntentSender 以便在使用者做出選擇時接收回撥。 如果呼叫應用程式想記住最後選定的目標,並將其作為更顯眼或一鍵的選項顯示在 UI 其他地方,方便下次使用,這會很有用。

Java 文件 android.content.Intent.createChooser(android.content.Intent, java.lang.CharSequence, android.content.IntentSender)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

CreateChooser(Intent, String, IntentSender)

方便功能用於建立 ActionChooser 意圖。

public static Android.Content.Intent? CreateChooser(Android.Content.Intent? target, string? title, Android.Content.IntentSender? sender);
static member CreateChooser : Android.Content.Intent * string * Android.Content.IntentSender -> Android.Content.Intent

參數

target
Intent

使用者選擇要執行的活動的意圖。

title
String

可選標題,僅在目標動作未ACTION_SEND或未ACTION_SEND_MULTIPLE時顯示於選擇器中。

sender
IntentSender

選擇性 IntentSender 在做出選擇時會被呼叫。

傳回

回傳一個新的 Intent 物件,可以交 Context#startActivity(Intent) Context.startActivity() 給它,還有相關方法。

備註

方便功能用於建立 ActionChooser 意圖。

建立一個新的 ActionChooser 意圖,包裹給定的目標意圖,並可選擇提供職稱。 若目標意圖指定 GrantReadUriPermission 或 GrantWriteUriPermission,則這些旗標也會在回傳的選擇器意圖中設定,並適當地設定其 ClipData:若非空,則直接反映 ClipData ,或由 建構 Data出新的 ClipData。

來電者可選擇性地提供 , IntentSender 以便在使用者做出選擇時接收回撥。 如果呼叫應用程式想記住最後選定的目標,並將其作為更顯眼或一鍵的選項顯示在 UI 其他地方,方便下次使用,這會很有用。

Java 文件 android.content.Intent.createChooser(android.content.Intent, java.lang.CharSequence, android.content.IntentSender)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於