How to get the value from a Bundle to another Fragment

Friday, July 4, 2014

I have problem of getting value of bundle to another fragment my code is working but getting the different data from SQLite Database for Example I log in my account after logging in diffrent data from other account is display in my Profile.class if someone can show me how to get the value from a bundle to another Fragment class


This is what I have in my Login.class



FragmentManager fm = getFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
DocProfile fragment = new Profile();
Bundle bundle = new Bundle();
bundle.putString("Name", c.getString(1));
bundle.putString("Age", c.getString(2));
bundle.putString("Gender", c.getString(3));
bundle.putString("Address", c.getString(4));
bundle.putString("Email", c.getString(5));
bundle.putString("Contact", c.getString(6));
fragment.setArguments(bundle);
ft.replace(R.id.content_frame, fragment);
ft.commit();






http://ift.tt/1j7qtsh