Language

PreferenceActivity.StartWithFragment Method

Definition

Overloads

Name Description
StartWithFragment(String, Bundle, Fragment, Int32)

Like #startWithFragment(String, Bundle, Fragment, int, int, int) but uses a 0 titleRes.

StartWithFragment(String, Bundle, Fragment, Int32, Int32, Int32)

Start a new instance of this activity, showing only the given preference fragment.

StartWithFragment(String, Bundle, Fragment, Int32)

Like #startWithFragment(String, Bundle, Fragment, int, int, int) but uses a 0 titleRes.

[Android.Runtime.Register("startWithFragment", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/app/Fragment;I)V", "GetStartWithFragment_Ljava_lang_String_Landroid_os_Bundle_Landroid_app_Fragment_IHandler")]
public virtual void StartWithFragment(string? fragmentName, Android.OS.Bundle? args, Android.App.Fragment? resultTo, int resultRequestCode);
[<Android.Runtime.Register("startWithFragment", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/app/Fragment;I)V", "GetStartWithFragment_Ljava_lang_String_Landroid_os_Bundle_Landroid_app_Fragment_IHandler")>]
abstract member StartWithFragment : string * Android.OS.Bundle * Android.App.Fragment * int -> unit
override this.StartWithFragment : string * Android.OS.Bundle * Android.App.Fragment * int -> unit

Parameters

fragmentName
String

The class name of the preference fragment to show.

args
Bundle

The optional arguments to pass to the fragment.

resultTo
Fragment

The fragment that receives the activity result, or null if no result is requested.

resultRequestCode
Int32

The request code used to report the result when resultTo is not null.

Attributes

Remarks

Like #startWithFragment(String, Bundle, Fragment, int, int, int) but uses a 0 titleRes.

Java documentation for android.preference.PreferenceActivity.startWithFragment(java.lang.String, android.os.Bundle, android.app.Fragment, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

StartWithFragment(String, Bundle, Fragment, Int32, Int32, Int32)

Start a new instance of this activity, showing only the given preference fragment.

[Android.Runtime.Register("startWithFragment", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/app/Fragment;III)V", "GetStartWithFragment_Ljava_lang_String_Landroid_os_Bundle_Landroid_app_Fragment_IIIHandler")]
public virtual void StartWithFragment(string? fragmentName, Android.OS.Bundle? args, Android.App.Fragment? resultTo, int resultRequestCode, int titleRes, int shortTitleRes);
[<Android.Runtime.Register("startWithFragment", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/app/Fragment;III)V", "GetStartWithFragment_Ljava_lang_String_Landroid_os_Bundle_Landroid_app_Fragment_IIIHandler")>]
abstract member StartWithFragment : string * Android.OS.Bundle * Android.App.Fragment * int * int * int -> unit
override this.StartWithFragment : string * Android.OS.Bundle * Android.App.Fragment * int * int * int -> unit

Parameters

fragmentName
String

The name of the fragment to display.

args
Bundle

Optional arguments to supply to the fragment.

resultTo
Fragment

Option fragment that should receive the result of the activity launch.

resultRequestCode
Int32

If resultTo is non-null, this is the request code in which to report the result.

titleRes
Int32

Resource ID of string to display for the title of this set of preferences.

shortTitleRes
Int32

Resource ID of string to display for the short title of this set of preferences.

Attributes

Remarks

Start a new instance of this activity, showing only the given preference fragment. When launched in this mode, the header list will be hidden and the given preference fragment will be instantiated and fill the entire activity.

Java documentation for android.preference.PreferenceActivity.startWithFragment(java.lang.String, android.os.Bundle, android.app.Fragment, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to