語言

ActionBar.ThemedContext 屬性

定義

回傳 Context 一個適合的主題,用於建立會出現在動作列中的視圖。

public virtual Android.Content.Context? ThemedContext { [Android.Runtime.Register("getThemedContext", "()Landroid/content/Context;", "GetGetThemedContextHandler")] get; }
[<get: Android.Runtime.Register("getThemedContext", "()Landroid/content/Context;", "GetGetThemedContextHandler")>]
member this.ThemedContext : Android.Content.Context

屬性值

建立視圖的主題情境

屬性

備註

回傳一個帶有適當主題的上下文,用於建立會出現在動作列中的視圖。 如果你要膨脹或實例化會出現在動作列中的自訂視圖,你應該使用此方法回傳的上下文。 (這包括用於列表導覽模式的轉接器。)這樣可以確保視角與動作條的對比度合理。

Android 參考資料。android.app.ActionBar.getThemedContext

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

適用於