my goal is to transport fragment data to another fragment.
this is what in have:
String ProductNummer_VALUE = NummerName.getText().toString();
Intent modify_intent = new Intent(getActivity(), MyActivity.class);
modify_intent.putExtra("memberName", ProductNummer_VALUE);
Log.i("MyActivity", "ListHistoryFragment " + ProductNummer_VALUE);
((MyActivity)getActivity()).test();
MyActivity:
public void test(){
// Create new fragment and transaction
Fragment newFragment = new DisplayFragment();
FragmentTransaction fragmentManager = getSupportFragmentManager().beginTransaction();
fragmentManager.replace(R.id.container, newFragment).addToBackStack(null).commit();
}
i tried using several methods, but i cant seem to get a handle on it.
Data is not being transported, because i tried using intents, to transport the data, but this way i couldnt launch to the new fragment. It just stayed on the MyActivity.class