Language

Resources.Theme.ObtainStyledAttributes メソッド

定義

オーバーロード

名前 説明
ObtainStyledAttributes(Int32[])

<var>attrs</var>に記載されている<var>Theme</var>で定義された値を保持している TypedArray を返します。

ObtainStyledAttributes(Int32, Int32[])

スタイル リソース <var>resid</var> で定義された値を保持する TypedArray を返します。値の一覧は <var>attrs</var>。

ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32)

属性の値を保持する TypedArray <var>set</var><var>attrs</var> に記載されている値を返します。

ObtainStyledAttributes(Int32[])

<var>attrs</var>に記載されている<var>Theme</var>で定義された値を保持している TypedArray を返します。

[Android.Runtime.Register("obtainStyledAttributes", "([I)Landroid/content/res/TypedArray;", "")]
public Android.Content.Res.TypedArray ObtainStyledAttributes(int[] attrs);
[<Android.Runtime.Register("obtainStyledAttributes", "([I)Landroid/content/res/TypedArray;", "")>]
member this.ObtainStyledAttributes : int[] -> Android.Content.Res.TypedArray

パラメーター

attrs
Int32[]

目的の属性。 これらの属性 ID は昇順で並べ替える必要があります。

返品

属性値の配列を保持している TypedArray を返します。 完了したら、必ず TypedArray#recycle() TypedArray.recycle() を呼び出してください。

属性

例外

指定された ID が存在しない場合は、NotFoundException をスローします。

注釈

<var>attrs</var>に記載されている<var>Theme</var>で定義された値を保持している TypedArray を返します。

配列の使用が完了したら、必ず TypedArray#recycle() TypedArray.recycle() を呼び出してください。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

こちらもご覧ください

  • <xref:Android.Content.Res.Resources.ObtainAttributes(Android.Util.IAttributeSet%2c+System.Int32%5b%5d)>
  • <xref:Android.Content.Res.Resources.Theme.ObtainStyledAttributes(System.Int32%2c+System.Int32%5b%5d)>
  • <xref:Android.Content.Res.Resources.Theme.ObtainStyledAttributes(Android.Util.IAttributeSet%2c+System.Int32%5b%5d%2c+System.Int32%5b%5d%2c+System.Int32%5b%5d)>

適用対象

ObtainStyledAttributes(Int32, Int32[])

スタイル リソース <var>resid</var> で定義された値を保持する TypedArray を返します。値の一覧は <var>attrs</var>。

[Android.Runtime.Register("obtainStyledAttributes", "(I[I)Landroid/content/res/TypedArray;", "")]
public Android.Content.Res.TypedArray ObtainStyledAttributes(int resId, int[] attrs);
[<Android.Runtime.Register("obtainStyledAttributes", "(I[I)Landroid/content/res/TypedArray;", "")>]
member this.ObtainStyledAttributes : int * int[] -> Android.Content.Res.TypedArray

パラメーター

resId
Int32

目的のスタイル リソース。

attrs
Int32[]

スタイル内の目的の属性。 これらの属性 ID は昇順で並べ替える必要があります。

返品

属性値の配列を保持している TypedArray を返します。 完了したら、必ず TypedArray#recycle() TypedArray.recycle() を呼び出してください。

属性

例外

指定された ID が存在しない場合は、NotFoundException をスローします。

注釈

スタイル リソース <var>resid</var> で定義された値を保持する TypedArray を返します。値の一覧は <var>attrs</var>。

配列の使用が完了したら、必ず TypedArray#recycle() TypedArray.recycle() を呼び出してください。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

こちらもご覧ください

  • <xref:Android.Content.Res.Resources.ObtainAttributes(Android.Util.IAttributeSet%2c+System.Int32%5b%5d)>
  • ObtainStyledAttributes(Int32[])
  • <xref:Android.Content.Res.Resources.Theme.ObtainStyledAttributes(Android.Util.IAttributeSet%2c+System.Int32%5b%5d%2c+System.Int32%5b%5d%2c+System.Int32%5b%5d)>

適用対象

ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32)

属性の値を保持する TypedArray <var>set</var><var>attrs</var> に記載されている値を返します。

[Android.Runtime.Register("obtainStyledAttributes", "(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;", "")]
public Android.Content.Res.TypedArray ObtainStyledAttributes(Android.Util.IAttributeSet? set, int[] attrs, int defStyleAttr, int defStyleRes);
[<Android.Runtime.Register("obtainStyledAttributes", "(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;", "")>]
member this.ObtainStyledAttributes : Android.Util.IAttributeSet * int[] * int * int -> Android.Content.Res.TypedArray

パラメーター

set
IAttributeSet

属性値の基本セット。 null を指定できます。

attrs
Int32[]

取得する必要がある属性。 これらの属性 ID は昇順で並べ替える必要があります。

defStyleAttr
Int32

TypedArray の既定値を提供するスタイル リソースへの参照を含む現在のテーマの属性。 既定値を探さない場合は 0 にすることができます。

defStyleRes
Int32

DefStyleAttr が 0 の場合、またはテーマで見つからない場合にのみ使用される、TypedArray の既定値を提供するスタイル リソースのリソース識別子。 既定値を探さない場合は 0 にすることができます。

返品

属性値の配列を保持している TypedArray を返します。 完了したら、必ず TypedArray#recycle() TypedArray.recycle() を呼び出してください。

属性

注釈

属性の値を保持する TypedArray <var>set</var><var>attrs</var> に記載されている値を返します。 さらに、指定された AttributeSet でスタイル クラスが ("style" 属性を使用して) 指定されている場合、そのスタイルは定義した基本属性の上に適用されます。

配列の使用が完了したら、必ず TypedArray#recycle() TypedArray.recycle() を呼び出してください。

特定の属性の最終的な値を決定するときに、次の 4 つの入力が実行されます。

<ol><li> 指定された AttributeSet 内の任意の属性値。 <li> AttributeSet で指定されたスタイル リソース ("style" という名前)。 <li><var>defStyleAttr</var> および <var>defStyleRes</var><li> このテーマの基本値で指定された既定のスタイル。 </ol>

これらの各入力は順番に見なされ、最初の一覧が次の入力よりも優先されます。 言い換えると、AttributeSet で &lt;Button textColor="#ff000000"&gt;指定した場合、ボタンのテキスト <em>always</em> は、どのスタイルで指定されているかに関係なく、黒になります。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

こちらもご覧ください

  • <xref:Android.Content.Res.Resources.ObtainAttributes(Android.Util.IAttributeSet%2c+System.Int32%5b%5d)>
  • ObtainStyledAttributes(Int32[])
  • <xref:Android.Content.Res.Resources.Theme.ObtainStyledAttributes(System.Int32%2c+System.Int32%5b%5d)>

適用対象