Preference コンストラクター

定義

オーバーロード

名前 説明
Preference(Context)

基本設定を作成するコンストラクター。

Preference(Context, IAttributeSet)

XML から Preference を拡張するときに呼び出されるコンストラクター。

Preference(IntPtr, JniHandleOwnership)

JNI オブジェクトのマネージド表現を作成するときに使用されるコンストラクター。ランタイムによって呼び出されます。

Preference(Context, IAttributeSet, Int32)

XML からインフレーションを実行し、クラス固有の基本スタイルを適用します。

Preference(Context, IAttributeSet, Int32, Int32)

XML からインフレーションを実行し、クラス固有の基本スタイルを適用します。

Preference(Context)

基本設定を作成するコンストラクター。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")]
public Preference(Android.Content.Context? context);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;)V", "")>]
new Android.Preferences.Preference : Android.Content.Context -> Android.Preferences.Preference

パラメーター

context
Context

基本設定の値を格納するコンテキスト。

属性

注釈

基本設定を作成するコンストラクター。

Javaドキュメント。

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

適用対象

Preference(Context, IAttributeSet)

XML から Preference を拡張するときに呼び出されるコンストラクター。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")]
public Preference(Android.Content.Context? context, Android.Util.IAttributeSet? attrs);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;)V", "")>]
new Android.Preferences.Preference : Android.Content.Context * Android.Util.IAttributeSet -> Android.Preferences.Preference

パラメーター

context
Context

現在のテーマ、リソース、 SharedPreferencesなどにアクセスできる、これが関連付けられているコンテキスト。

attrs
IAttributeSet

設定を拡張する XML タグの属性。

属性

注釈

XML から Preference を拡張するときに呼び出されるコンストラクター。 これは、XML ファイルからユーザー設定を作成するときに呼び出され、XML ファイルで指定された属性を指定します。 このバージョンでは既定のスタイル 0 が使用されるため、適用される属性値はコンテキストのテーマと指定された AttributeSet 内の属性値のみです。

Javaドキュメント。

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

こちらもご覧ください

  • <xref:Android.Preferences.Preference(Android.Content.Context%2c+Android.Util.IAttributeSet%2c+Android.Util.IAttributeSet)>

適用対象

Preference(IntPtr, JniHandleOwnership)

JNI オブジェクトのマネージド表現を作成するときに使用されるコンストラクター。ランタイムによって呼び出されます。

protected Preference(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Preferences.Preference : nativeint * Android.Runtime.JniHandleOwnership -> Android.Preferences.Preference

パラメーター

javaReference
IntPtr

nativeint

Java ネイティブ インターフェイス (JNI) オブジェクト参照を含むIntPtr

transfer
JniHandleOwnership

JniHandleOwnership処理方法を示すjavaReference

注釈

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

適用対象

Preference(Context, IAttributeSet, Int32)

XML からインフレーションを実行し、クラス固有の基本スタイルを適用します。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "")]
public Preference(Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "")>]
new Android.Preferences.Preference : Android.Content.Context * Android.Util.IAttributeSet * int -> Android.Preferences.Preference

パラメーター

context
Context

現在のテーマ、リソース、 SharedPreferencesなどにアクセスできる、これが関連付けられているコンテキスト。

attrs
IAttributeSet

設定を拡張する XML タグの属性。

defStyleAttr
Int32

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

属性

注釈

XML からインフレーションを実行し、クラス固有の基本スタイルを適用します。 Preference のこのコンストラクターを使用すると、サブクラスが膨らんでいるときに独自の基本スタイルを使用できます。 たとえば、CheckBoxPreference コンストラクターは、このバージョンのスーパー クラス コンストラクターを呼び出し、<var>defStyleAttr</var> のandroid.R.attr.checkBoxPreferenceStyleを提供します。 これにより、テーマのチェックボックスの基本設定スタイルで、基本設定属性と CheckBoxPreference クラスの属性をすべて変更できます。

Javaドキュメント。

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

こちらもご覧ください

  • <xref:Android.Preferences.Preference(Android.Content.Context%2c+Android.Util.IAttributeSet)>

適用対象

Preference(Context, IAttributeSet, Int32, Int32)

XML からインフレーションを実行し、クラス固有の基本スタイルを適用します。

[Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "")]
public Preference(Android.Content.Context? context, Android.Util.IAttributeSet? attrs, int defStyleAttr, int defStyleRes);
[<Android.Runtime.Register(".ctor", "(Landroid/content/Context;Landroid/util/AttributeSet;II)V", "")>]
new Android.Preferences.Preference : Android.Content.Context * Android.Util.IAttributeSet * int * int -> Android.Preferences.Preference

パラメーター

context
Context

現在のテーマ、リソース、 SharedPreferencesなどにアクセスできる、これが関連付けられているコンテキスト。

attrs
IAttributeSet

設定を拡張する XML タグの属性。

defStyleAttr
Int32

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

defStyleRes
Int32

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

属性

注釈

XML からインフレーションを実行し、クラス固有の基本スタイルを適用します。 Preference のこのコンストラクターを使用すると、サブクラスが膨らんでいるときに独自の基本スタイルを使用できます。 たとえば、CheckBoxPreference コンストラクターは、このバージョンのスーパー クラス コンストラクターを呼び出し、<var>defStyleAttr</var> のandroid.R.attr.checkBoxPreferenceStyleを提供します。 これにより、テーマのチェックボックスの基本設定スタイルで、基本設定属性と CheckBoxPreference クラスの属性をすべて変更できます。

Javaドキュメント。

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

こちらもご覧ください

  • <xref:Android.Preferences.Preference(Android.Content.Context%2c+Android.Util.IAttributeSet)>

適用対象