I am having trouble wrapping my head around something but let me first describe my setup:
I ha
I don't see code from your post. So I am guessing your code structure as a start. First build your dialog with a listener and process setPositiveButton() and the onClick event.
Code suggestion:
public class ChildrenSpecificationFragment extends Fragment {
...
public void passData(Object obj) {
}
class SubChildFragment extends Fragment {
AlertDialog.Builder builder = new AlertDialog.Builder(thisContext);
...
// Add the buttons...
builder.setPositiveButton("Save", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
...
passData(Object obj); // pass data to the outer fragment class
Notes:
SubChildFragment
, for example, is an inner class derived from Fragment. It can call the public method passData
() in the outer class ChildrenSpecificationFragment
for passing any data you need.Add child full-screen fragment
For showing fullscreen dialogs, there is a good Google webpage I think @ Dialog - Fullscreen. Search text for "Showing a Dialog Fullscreen or as an Embedded Fragment".