Resources.GetValueForDensity(Int32, Int32, TypedValue, Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得與具有相關聯密度之資源相關聯的原始值。
[Android.Runtime.Register("getValueForDensity", "(IILandroid/util/TypedValue;Z)V", "GetGetValueForDensity_IILandroid_util_TypedValue_ZHandler")]
public virtual void GetValueForDensity(int id, int density, Android.Util.TypedValue? outValue, bool resolveRefs);
[<Android.Runtime.Register("getValueForDensity", "(IILandroid/util/TypedValue;Z)V", "GetGetValueForDensity_IILandroid_util_TypedValue_ZHandler")>]
abstract member GetValueForDensity : int * int * Android.Util.TypedValue * bool -> unit
override this.GetValueForDensity : int * int * Android.Util.TypedValue * bool -> unit
參數
- id
- Int32
資源標識碼
- density
- Int32
DPI 中的密度
- outValue
- TypedValue
- resolveRefs
- Boolean
如果為 true,則會遵循另一個資源的參考資源,以便您收到實際的最終資源數據。 如果為 false,則 TypedValue 會填入參考本身。
- 屬性
例外狀況
如果指定的標識碼不存在,則會擲回 NotFoundException。
備註
取得與具有相關聯密度之資源相關聯的原始值。
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。
適用於
另請參閱
- <xref:Android.Content.Res.Resources.GetValue(System.String%2c+Android.Util.TypedValue%2c+Android.Util.TypedValue)>