In my application there are some values in list view and on clicking the list Item am getting values from database and passing it using intent in an array list
ArrayList<String> s = new ArrayList<String>();
s = mDbHelper.fetchDetails(appName);
// s.add(app_formno);
/*
* for(int i =0; i<Data.size();i++){ s.add(Data.get(position));
* System.out.println(Data.get(position)+"*****"+i); }
*/
prefEditor.putBoolean("gotobundle", true);
prefEditor.commit();
startActivity(new Intent(ListViewDetails.this,
ApplicationManagement.class).putExtra("list", s));
I am getting the array list in e bundle which is in Tab widget(TAB 1).
protected void onResume() {
super.onResume();
settings = getSharedPreferences("LandTshare", MODE_PRIVATE);
prefEditor = settings.edit();
boolean bool = settings.getBoolean("gotobundle", false);
if (bool == true) {
Bundle b = getParent().getIntent().getExtras();
// ArrayList<String> bundlevalue = new ArrayList<String>();
bundlevalue = new ArrayList<String>();
if (b != null) {
bundlevalue = b.getStringArrayList("list");
this code prints the respective values in tab 1 but when i go to tab 2 the value in the bundle is empty and my application force closes.. Below is the code in TAB 2
protected void onResume() {
super.onResume();
boolean bool = settings.getBoolean("gotobundle", false);
if(bool == true){
if (Applicant.bundlevalue.size() > 124 == true){
for (int i = 125; i <= 146; i++)
System.out.println(Applicant.bundlevalue.get(i));
if (Applicant.bundlevalue.get(125).equalsIgnoreCase("Yes")) {
rg_existin1.check(R.id.rYes);
} else {
rg_existin1.check(R.id.rNo);
}
what is the issue here?? i cant seem to figure out! Please help!