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

Preference 値を格納するコンテキスト。

属性

注釈

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

の Java ドキュメント android.preference.Preference.Preference(android.content.Context)

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

適用対象

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 ファイルから Preference を構築し、XML ファイルで指定された属性を指定するときに呼び出されます。 このバージョンでは既定のスタイル 0 が使用されるため、適用される属性値はコンテキストのテーマと指定された AttributeSet 内の属性値のみです。

の Java ドキュメント android.preference.Preference.Preference(android.content.Context, android.util.AttributeSet)

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

こちらもご覧ください

  • <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

IntPtrJava Native Interface (JNI) オブジェクト参照を含む 。

transfer
JniHandleOwnership

処理方法を示す 。JniHandleOwnershipjavaReference

注釈

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

適用対象

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 ドキュメント android.preference.Preference.Preference(android.content.Context, android.util.AttributeSet, int)

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

こちらもご覧ください

  • <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 ドキュメント android.preference.Preference.Preference(android.content.Context, android.util.AttributeSet, int, int)

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

こちらもご覧ください

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

適用対象