語言

WalletCard.Builder 建構函式

定義

多載

名稱 Description
WalletCard.Builder(String, Icon, ICharSequence, PendingIntent)

當未提供卡片類型時會呼叫,此時預設為CARD_TYPE_UNKNOWN。

WalletCard.Builder(String, Icon, String, PendingIntent)

當未提供卡片類型時會呼叫,此時預設為CARD_TYPE_UNKNOWN。

WalletCard.Builder(String, WalletCardType, Icon, ICharSequence, PendingIntent)

初始化錢包卡建置器,包含識別碼、卡片類型、圖片、內容描述及待處理意圖。

WalletCard.Builder(String, WalletCardType, Icon, String, PendingIntent)

初始化錢包卡建器,包含識別碼、卡片類型、圖片、字串內容描述及待處理意圖。

WalletCard.Builder(String, Icon, ICharSequence, PendingIntent)

當未提供卡片類型時會呼叫,此時預設為CARD_TYPE_UNKNOWN。

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=30)]
public Builder(string cardId, Android.Graphics.Drawables.Icon cardImage, Java.Lang.ICharSequence contentDescription, Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=30)>]
new Android.Service.QuickAccessWallet.WalletCard.Builder : string * Android.Graphics.Drawables.Icon * Java.Lang.ICharSequence * Android.App.PendingIntent -> Android.Service.QuickAccessWallet.WalletCard.Builder

參數

cardId
String

卡片 ID 必須非空且在回傳卡片列表中唯一。 <b>注意:</b> 此卡片 ID 不應<><>包含個人識別資訊(PII,如使用者名稱或電子郵件地址)。

cardImage
Icon

卡片的視覺呈現。 如果卡片圖片圖示是點陣圖,寬度 GetWalletCardsRequest#getCardWidthPx() 應該是 ,高度應該是 GetWalletCardsRequest#getCardHeightPx()。 若卡片影像沒有這些尺寸,當縮放成符合這些尺寸時,畫面可能會顯得扭曲。 位圖必須是型別 android.graphics.Bitmap.Config#HARDWARE ,以提升效能。

contentDescription
ICharSequence

卡片圖片的內容描述。 此欄位為必需欄位,且不得為空或空。 <b>注意:</b> 此訊息不應<><>包含個人識別資訊(PII,如使用者名稱或電子郵件地址)。

pendingIntent
PendingIntent

如果使用者點擊卡片,這份待處理意圖就會被傳送。 如果裝置被鎖定,錢包會先請求裝置解鎖,再發送待處理意圖。 建議待處理意圖為不可變(使用 PendingIntent#FLAG_IMMUTABLE)。

屬性

備註

當未提供卡片類型時會呼叫,此時預設為CARD_TYPE_UNKNOWN。 叫聲 Builder#Builder(String, int, Icon, CharSequence, PendingIntent)

Java 文件 android.service.quickaccesswallet.WalletCard.Builder.WalletCard$Builder(java.lang.String, android.graphics.drawable.Icon, java.lang.CharSequence, android.app.PendingIntent)。

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

適用於

WalletCard.Builder(String, Icon, String, PendingIntent)

當未提供卡片類型時會呼叫,此時預設為CARD_TYPE_UNKNOWN。

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=30)]
public Builder(string cardId, Android.Graphics.Drawables.Icon cardImage, string contentDescription, Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Landroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=30)>]
new Android.Service.QuickAccessWallet.WalletCard.Builder : string * Android.Graphics.Drawables.Icon * string * Android.App.PendingIntent -> Android.Service.QuickAccessWallet.WalletCard.Builder

參數

cardId
String

非空卡識別碼。 該回覆必須在回應列表中獨一無二,且不得包含個人資訊。

cardImage
Icon

非空卡映像。 點陣圖映像必須使用硬體配置,且應與請求中的影像尺寸相符。

contentDescription
String

卡片圖片的非空描述。 內容不得包含個人資訊。

pendingIntent
PendingIntent

當使用者點擊卡片時,發送的非空待定意圖。 如果需要,錢包會先要求裝置解鎖。 請依照 Android 建議使用不可變的待定意圖。

屬性

備註

當未提供卡片類型時會呼叫,此時預設為CARD_TYPE_UNKNOWN。 呼叫建構者。建構者(String, int, Icon, CharSequence, PendingIntent)

Android 參考資料。android.service.quickaccesswallet.WalletCard.Builder.Builder

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

適用於

WalletCard.Builder(String, WalletCardType, Icon, ICharSequence, PendingIntent)

初始化錢包卡建置器,包含識別碼、卡片類型、圖片、內容描述及待處理意圖。

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;ILandroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=34)]
public Builder(string cardId, Android.Service.QuickAccessWallet.WalletCardType cardType, Android.Graphics.Drawables.Icon cardImage, Java.Lang.ICharSequence contentDescription, Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;ILandroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=34)>]
new Android.Service.QuickAccessWallet.WalletCard.Builder : string * Android.Service.QuickAccessWallet.WalletCardType * Android.Graphics.Drawables.Icon * Java.Lang.ICharSequence * Android.App.PendingIntent -> Android.Service.QuickAccessWallet.WalletCard.Builder

參數

cardId
String

卡片 ID 必須非空且在回傳卡片列表中唯一。 <b>注意:</b> 此卡片 ID 不應<><>包含個人識別資訊(PII,如使用者名稱或電子郵件地址)。

cardType
WalletCardType

整數代表卡片類型。 卡片類型必須是非空卡。

cardImage
Icon

卡片的視覺呈現。 如果卡片圖片圖示是點陣圖,寬度 GetWalletCardsRequest#getCardWidthPx() 應該是 ,高度應該是 GetWalletCardsRequest#getCardHeightPx()。 若卡片影像沒有這些尺寸,當縮放成符合這些尺寸時,畫面可能會顯得扭曲。 位圖必須是型別 android.graphics.Bitmap.Config#HARDWARE ,以提升效能。

contentDescription
ICharSequence

卡片圖片的內容描述。 此欄位為必需欄位,且不得為空或空。 <b>注意:</b> 此訊息不應<><>包含個人識別資訊(PII,如使用者名稱或電子郵件地址)。

pendingIntent
PendingIntent

如果使用者點擊卡片,這份待處理意圖就會被傳送。 如果裝置被鎖定,錢包會先請求裝置解鎖,再發送待處理意圖。 建議待處理意圖為不可變(使用 PendingIntent#FLAG_IMMUTABLE)。

屬性

備註

Java 文件 android.service.quickaccesswallet.WalletCard.Builder.WalletCard$Builder(java.lang.String, int, android.graphics.drawable.Icon, java.lang.CharSequence, android.app.PendingIntent)。

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

適用於

WalletCard.Builder(String, WalletCardType, Icon, String, PendingIntent)

初始化錢包卡建器,包含識別碼、卡片類型、圖片、字串內容描述及待處理意圖。

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;ILandroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=34)]
public Builder(string cardId, Android.Service.QuickAccessWallet.WalletCardType cardType, Android.Graphics.Drawables.Icon cardImage, string contentDescription, Android.App.PendingIntent pendingIntent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;ILandroid/graphics/drawable/Icon;Ljava/lang/CharSequence;Landroid/app/PendingIntent;)V", "", ApiSince=34)>]
new Android.Service.QuickAccessWallet.WalletCard.Builder : string * Android.Service.QuickAccessWallet.WalletCardType * Android.Graphics.Drawables.Icon * string * Android.App.PendingIntent -> Android.Service.QuickAccessWallet.WalletCard.Builder

參數

cardId
String

卡片 ID 必須非空且在回傳卡片列表中唯一。 注意:此卡片識別碼不應包含個人識別資訊(PII,如使用者名稱或電子郵件地址)。

cardType
WalletCardType

整數代表卡片類型。 卡片類型必須是非空卡。 價值屬於以下之一:WalletCard.CARD_TYPE_UNKNOWN;WalletCard.CARD_TYPE_PAYMENT;WalletCard.CARD_TYPE_NON_PAYMENT

cardImage
Icon

卡片的視覺呈現。 如果卡片圖片圖示是點陣圖,寬度應該是 GetWalletCardsRequest.getCardWidthPx() ,高度則是 GetWalletCardsRequest.getCardHeightPx()。 若卡片影像沒有這些尺寸,當縮放成符合這些尺寸時,畫面可能會顯得扭曲。 位圖必須是 Bitmap.Config.HARDWARE 類型,以提升效能。 這個值不可能為零值。

contentDescription
String

卡片圖片的內容描述。 此欄位為必需欄位,且不得為空或空。 注意:此訊息不應包含個人識別資訊(PII,如使用者名稱或電子郵件地址)。

pendingIntent
PendingIntent

如果使用者點擊卡片,這份待處理意圖就會被傳送。 如果裝置被鎖定,錢包會先請求裝置解鎖,再發送待處理意圖。 建議待處理意圖為不可變(使用PendingIntent.FLAG_IMMUTABLE)。 這個值不可能為零值。

屬性

備註

Android 參考資料。android.service.quickaccesswallet.WalletCard.Builder.Builder

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

適用於