What Is Best Way To Pass Json Data One Fragment To Another Fragment
I have two fragments in site my first fragment call AsyncTask and get some json values.and then i want to pass my JSON values to my second Fragment's TextViews.What is the best wa
Solution 1:
You can use bundle to pass data to Fragment_account_details like this :
Fragmentfragment=newFragment_account_details();
Bundlebundle=newBundle();
bundle.putString("name", name);
fragment.setArguments(bundle);
now in your Fragment_account_details onCreateView do like :
String name= getArguments().getString("name");
like this you can pass values.hope this helps.
Post a Comment for "What Is Best Way To Pass Json Data One Fragment To Another Fragment"