Skip to content Skip to sidebar Skip to footer

Pass Item[] To Dialogfragment

I am trying to pass the String [] items of my Dialog Fragment when the activity is running, as this String is updated and its values, which are showing the DialogFragment are updat

Solution 1:

You can add a bundle when committing the DialogoFragment

Bundle bundle= newBundle();
bundle.putStringArray(A_KEY,mArray);
DialogoSelecciondialogo=newDialogoSeleccion();
dialogo.setArguments(bundle);

And then you retrieve the bundle arguments in your Dialog

String[] array = bundle.getArguments().getStringArray(A_KEY);

Post a Comment for "Pass Item[] To Dialogfragment"