I need help or recomendation for solve this problem
CODE FROM Fragment A
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Origin to send variable
String valor3;
Intent intent = new Intent(getActivity(), MainFragment.class);
Bundle bundle = new Bundle();
//bundle.putString("row_s",valor3);
intent.putExtra("row_S",valor3);
startActivity(intent);
}
CODE FROM Fragment B
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getActivity().getIntent();
recibeBundle = getActivity().getIntent().getStringExtra("row_s");
ROW_SIZE = (Integer.parseInt(recibeBundle));
initData();
}
With ROW_SIZE =.. Launch this ERROR
**//Identified Problem - NPE Attempt to invoke virtual method 'int android.os.Bundle.getInt(java.lang.String)' on a null object reference at
com.project.ignacio_rvf_bbf.bbf_reporter.MainFragment.onCreate(MainFragment.java:99)**
Thanks a lot friends!