I was trying to go to another page using button
, but it always fail.
Here is my First Class with its XML:
public class Fin
in your receiving intent use as
Intent intent = getActivity().getIntent();
((TextView)view.findViewById(R.id.hello)).setText(intent.getStringExtra("Hello"));
and in your send intent
Intent intent = new Intent(getActivity(),Main2Activity.class);
intent.putExtra("Hello","Nisar");
getActivity().startActivity(intent);
remember both are in fragments