Compartir a través de


FragmentTransaction.Add Método

Definición

Sobrecargas

Add(Fragment, String)

Llama a #add(int, Fragment, String) con 0 containerViewId.

Add(Int32, Fragment)

Llama a #add(int, Fragment, String) con una etiqueta null.

Add(Int32, Fragment, String)

Agregue un fragmento al estado de la actividad.

Add(Fragment, String)

Llama a #add(int, Fragment, String) con 0 containerViewId.

[Android.Runtime.Register("add", "(Landroid/app/Fragment;Ljava/lang/String;)Landroid/app/FragmentTransaction;", "GetAdd_Landroid_app_Fragment_Ljava_lang_String_Handler")]
public abstract Android.App.FragmentTransaction? Add (Android.App.Fragment? fragment, string? tag);
[<Android.Runtime.Register("add", "(Landroid/app/Fragment;Ljava/lang/String;)Landroid/app/FragmentTransaction;", "GetAdd_Landroid_app_Fragment_Ljava_lang_String_Handler")>]
abstract member Add : Android.App.Fragment * string -> Android.App.FragmentTransaction

Parámetros

fragment
Fragment
tag
String

Devoluciones

Atributos

Comentarios

Llama a #add(int, Fragment, String) con 0 containerViewId.

Documentación de Java para android.app.FragmentTransaction.add(android.app.Fragment, java.lang.String).

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el proyecto de código Project y que se usan según los términos Creative Commons 2.5 Attribution License.

Se aplica a

Add(Int32, Fragment)

Llama a #add(int, Fragment, String) con una etiqueta null.

[Android.Runtime.Register("add", "(ILandroid/app/Fragment;)Landroid/app/FragmentTransaction;", "GetAdd_ILandroid_app_Fragment_Handler")]
public abstract Android.App.FragmentTransaction? Add (int containerViewId, Android.App.Fragment? fragment);
[<Android.Runtime.Register("add", "(ILandroid/app/Fragment;)Landroid/app/FragmentTransaction;", "GetAdd_ILandroid_app_Fragment_Handler")>]
abstract member Add : int * Android.App.Fragment -> Android.App.FragmentTransaction

Parámetros

containerViewId
Int32
fragment
Fragment

Devoluciones

Atributos

Comentarios

Llama a #add(int, Fragment, String) con una etiqueta null.

Documentación de Java para android.app.FragmentTransaction.add(int, android.app.Fragment).

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el proyecto de código Project y que se usan según los términos Creative Commons 2.5 Attribution License.

Se aplica a

Add(Int32, Fragment, String)

Agregue un fragmento al estado de la actividad.

[Android.Runtime.Register("add", "(ILandroid/app/Fragment;Ljava/lang/String;)Landroid/app/FragmentTransaction;", "GetAdd_ILandroid_app_Fragment_Ljava_lang_String_Handler")]
public abstract Android.App.FragmentTransaction? Add (int containerViewId, Android.App.Fragment? fragment, string? tag);
[<Android.Runtime.Register("add", "(ILandroid/app/Fragment;Ljava/lang/String;)Landroid/app/FragmentTransaction;", "GetAdd_ILandroid_app_Fragment_Ljava_lang_String_Handler")>]
abstract member Add : int * Android.App.Fragment * string -> Android.App.FragmentTransaction

Parámetros

containerViewId
Int32

Identificador opcional del contenedor en el que se colocará este fragmento. Si es 0, no se colocará en un contenedor.

fragment
Fragment

Fragmento que se va a agregar. Este fragmento aún no se debe agregar a la actividad.

tag
String

Nombre de etiqueta opcional para el fragmento, para recuperar más adelante el fragmento con FragmentManager#findFragmentByTag(String) FragmentManager.findFragmentByTag(String).

Devoluciones

Devuelve la misma instancia de FragmentTransaction.

Atributos

Comentarios

Agregue un fragmento al estado de la actividad. Este fragmento también puede tener su vista (si Fragment#onCreateView Fragment.onCreateView devuelve un valor distinto de NULL) insertada en una vista de contenedor de la actividad.

Documentación de Java para android.app.FragmentTransaction.add(int, android.app.Fragment, java.lang.String).

Las partes de esta página son modificaciones basadas en el trabajo creado y compartido por el proyecto de código Project y que se usan según los términos Creative Commons 2.5 Attribution License.

Se aplica a