PackageManager.GetTextFormatted(String, Int32, ApplicationInfo) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從包裹中擷取文字。
[Android.Runtime.Register("getText", "(Ljava/lang/String;ILandroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;", "GetGetText_Ljava_lang_String_ILandroid_content_pm_ApplicationInfo_Handler")]
public abstract Java.Lang.ICharSequence? GetTextFormatted(string packageName, int resid, Android.Content.PM.ApplicationInfo? appInfo);
[<Android.Runtime.Register("getText", "(Ljava/lang/String;ILandroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence;", "GetGetText_Ljava_lang_String_ILandroid_content_pm_ApplicationInfo_Handler")>]
abstract member GetTextFormatted : string * int * Android.Content.PM.ApplicationInfo -> Java.Lang.ICharSequence
參數
- packageName
- String
這段文字來自的包裹名稱。 不可為空值。
- resid
- Int32
目標文字的資源識別碼。 不可能是0。
- appInfo
- ApplicationInfo
關於 <var>packageName</var> 的整體資訊。 這可能是空的,若需要,應用程式資訊會自動幫你取得;如果你已經有這些資訊,提供這裡會更有效率。
傳回
回傳一個包含所請求文字的 CharSequence。 若因任何原因找不到該文字,則回傳為空。
- 屬性
備註
從包裹中擷取文字。 這是一個由各種套件管理器資訊結構使用的低階 API(例如 ComponentInfo 實作其相關標籤及其他文字的檢索)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。