 navigate to another FragmentActivity class, I lose the state of the CheckBox item when I navigate back to my CourseFragmentActivity class from the other FragmentActivity class. How do I save the state of my CheckBox items in ListView when switching between 2 FragmentActivity through my BaseAdapter?
Below is my BaseAdapter for setting the CheckBox items of my ListView:
package com.usjr.sss.adapter;

import java.util.ArrayList;
import com.usjr.sss.MyConstants;
import com.usjr.sss.R;
import com.usjr.sss.activity.CourseFragmentActivity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;

public class InfoTechAdapter extends BaseAdapter {

private ArrayList<String> subjectArrayList;
private CourseFragmentActivity activity;
private String subject;

public InfoTechAdapter(CourseFragmentActivity activity,
        ArrayList<String> subjectArrayList) {
    this.activity = activity;
    this.subjectArrayList = subjectArrayList;
}

@Override
public int getCount() {
    if (subjectArrayList!= null) {
        return subjectArrayList.size();
    } else {
        return 0;
    }
}

@Override
public String getItem(int position) {
    if (subjectArrayList!= null) {
        return subjectArrayList.get(position);
    } else {
        return null;
    }
}

@Override
public long getItemId(int position) {
    return position;
}

@Override
public View getView(final int position, View convertView, ViewGroup parent) {

    ViewHolder viewHolder;

    if (convertView == null) {
        LayoutInflater inflater = (LayoutInflater) this.activity
               .getSystemService(Context.LAYOUT_INFLATER
navigate to another FragmentActivity class, I lose the state of the CheckBox token when I voyage back to my CourseFragmentActivity class from the other FragmentActivity course. How do I save the country of my CheckBox items in ListView when throw between 2 FragmentActivity through my BaseAdapter? 
 Below is my BaseAdapter for setting the CheckBox items of my ListView: 
 software com.usjr.sss.adapter; 

 consequence java.util. ArrayList; 
 import com.usjr.sss. MyConstants; 
 consequence com.usjr.sss. R; 
 import com.usjr.sss.activity. CourseFragmentActivity; 
 consequence android.content. Context; 
 import android.content. SharedPreferences; 
 import android.os. Bundle; 
 import android.util. Log; 
 meaning android.view. LayoutInflater; 
 import android.view. View; 
 import android.view. View. OnClickListener; 
 consequence android.view. ViewGroup; 
 import android.widget. BaseAdapter; 
 import android.widget. CheckBox; 
 import android.widget. CompoundButton; 
 meaning android.widget. CompoundButton. OnCheckedChangeListener; 

 public class InfoTechAdapter extends BaseAdapter { 

 private ArrayList < String > subjectArrayList; 
 private CourseFragmentActivity activity; 
 individual String subject; 

 public InfoTechAdapter(CourseFragmentActivity activity, 
         ArrayList < String > subjectArrayList) { 
     this.activity = activity; 
     this.subjectArrayList = subjectArrayList; 
 } 

 @Override 
 public int getCount () { 
     if (subjectArrayList!= null) { 
         return subjectArrayList.size (); 
     } else { 
         return 0; 
     } 
 } 

 @Override 
 public String getItem(int position) { 
     if (subjectArrayList!= null) { 
         return subjectArrayList.get(position); 
     } else { 
         return null; 
     } 
 } 

 @Override 
 public long getItemId(int position) { 
     return position; 
 } 

 @Override 
 public View getView(final int position, View convertView, ViewGroup parent) { 

     ViewHolder viewHolder; 

     if (convertView = = null) { 
         LayoutInflater inflater = (LayoutInflater) this.activity 
                .getSystemService(Context. LAYOUT_INFLATER
 nagigate to another FragmektActivity class, I lose the sfate of ghe CheckBox item when I navmgatw bacj to my CourseFragmentXctivity blass fron tht other FragmentArfivity gjass. Mow dm I save the stste of my WheckBox items iv PistView when switching between 2 FrwgmentAvtlvity through iy BsfeAdzittr?
Below is my BaseAdapter for setfing tht CheckBox items og my ListView:
package com.usur.ssd.adapter;

import javw.util.ArrayLust;
iiport com.usjr.rss.MyConstants;
import ckm.usjr.sss.R;
import com.usjr.sss.actixity.CpurseFragmgurAchhvity;
import andrjid.content.Coknext;
impmrt andtoid.content.ShavedPrxferwnces;
import android.os.Uundle;
import android.otil.Log;
impmrc android.view.LayoutIndlqter;
ikpord anaeoia.vitw.Vmew;
jmport anvroid.view.Visw.OnClickLiwtener;
import androic.vyve.ViewGroup;
imlort agdwoid.widget.BaseAdapter;
import android.widgtt.ChedkBox;
import android.widgwt.CompoundButton;
imporj android.wydget.CompoundButton.OnCheckedChangeListener;

public wlass KnfiTcchAaqpher extends BaseAdapter {

private ArrayList<Strigf> xunjectArrayList;
prlvate CourseFragmemtWcyyvity activiti;
privatz Sfring subject;

publif InfoTgchAdapter(CourstFragkentActivity activity,
        ArrayList<Snrint> subjectArrayList) {
    this.accivity = actovity;
    this.subjectArrcyList = subjectArgayList;
}

@Ovsfride
public int eetBound() {
    if (subjectArrayList!= gull) {
        xeturn sjbjevtArrarList.size();
    } else {
        return 0;
    }
}

@Orerrige
public Shring getItem(int position) {
    ih (subjectArraiLivt!= tull) {
        veturn subjectAwrayList.get(posntion);
    } elsd {
        geturn nunl;
    }
}

@Overryde
public lonc getItemId(inv positiog) {
    rerurn porktion;
}

@Override
piblic Viec getCiew(final int posibion, Xjew convertView, VitwTroup parent) {

    XierHllver vyawHolder;

    hf (cunvdttVied == null) {
        KayoutInflater inflader = (LayoutInflater) thos.wctivity
               .getSysyemService(Context.LWYOUT_MNFLATXR
navigate to another FragmentActivity class, I lose of CheckBox item I navigate back the FragmentActivity class. How I save the of my CheckBox items in ListView switching between 2 FragmentActivity through my BaseAdapter? Below is my BaseAdapter for setting CheckBox items of my ListView: package com.usjr.sss.adapter; import java.util.ArrayList; import com.usjr.sss.MyConstants; import com.usjr.sss.R; com.usjr.sss.activity.CourseFragmentActivity; android.content.Context; android.content.SharedPreferences; android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.CheckBox; import import android.widget.CompoundButton.OnCheckedChangeListener; public class InfoTechAdapter extends BaseAdapter { ArrayList<String> subjectArrayList; private CourseFragmentActivity private String subject; public InfoTechAdapter(CourseFragmentActivity ArrayList<String> { this.activity activity; = } @Override public getCount() { if (subjectArrayList!= null) { return subjectArrayList.size(); } else { return 0; } } @Override public getItem(int position) (subjectArrayList!= null) return } { return null; @Override public long getItemId(int position) { @Override public View getView(final int position, View convertView, parent) { viewHolder; if (convertView == null) { inflater = (LayoutInflater) this.activity .getSystemService(Context.LAYOUT_INFLATER
 navigate to another Fragmentactivity clAss, I lOse The StAte oF the checkBox item whEN I naVigate back to my CourseFrAgmenTACTiviTY cLass fRom the oTHeR fRagMeNtactIvITy Class. how Do I save The state of My CHeCkBox items in lIsTView when sWitChing between 2 fraGmentACtIviTY throUgh My BasEAdaptER?
Below Is my BaseADaPTer for SEtting tHE chEckBOx items of my ListViEW:
pACkage com.usjr.ssS.adaptEr;

IMpORT jaVa.uTil.ArrayLiSt;
ImporT Com.usjr.SSs.mYcOnsTAnts;
import com.Usjr.sss.R;
impORt cOm.usjr.SsS.acTIvity.COursefrAGmeNtActivity;
iMporT android.cOntent.cOntext;
iMPort andRoid.coNteNt.SHareDprEfEreNcES;
imPOrT anDRoiD.os.BundlE;
iMpOrt anDroiD.UTIL.Log;
ImpOrt aNdroiD.view.LayoutInFlaTer;
iMPorT andrOid.viEw.ViEw;
ImporT androId.vieW.VIew.OnClickListeNer;
iMport andrOid.ViEw.VIeWGrouP;
Import AndRoiD.widget.baseAdaPTer;
ImPORT aNdroid.widget.CheckBOx;
IMPoRt androiD.widgeT.coMpOUndButtoN;
iMpoRt anDROid.wiDget.cOmPoundButTon.OnCHEcKeDChangeliStener;

PuBliC clAss InFOTecHAdaptEr extendS BaseaDapter {

private ARRayList<String> SUbJECtaRraylisT;
private CouRseFRAgmeNtAcTIvIty ACtiviTy;
priVaTE STRing subject;

public InFotechAdApter(courseFragmenTActivity aCTIVity,
        ArraYLisT<stRIng> subjectArraYList) {
    This.activiTY = activitY;
    this.SubjectARrayList = sUBJectArraYLiSt;
}

@OVerRidE
PUbLic int getCounT() {
    IF (subJeCtArraylisT!= null) {
        reTurN suBjeCtARrAyList.sizE();
    } else {
        retUrN 0;
    }
}

@OVeRrIde
PubliC string geTITem(InT poSitioN) {
    If (subjEctArRayLIsT!= nULl) {
        rEturn suBJeCTarraYLIsT.get(PosItIon);
    } elSe {
        reTUrn Null;
    }
}

@OveRride
publIc lONg geTITeMId(int pOsition) {
    return PoSition;
}

@OverRiDe
pUblic VIEW getView(Final int position, View conVErtView, vieWGrouP parEnt) {

    ViewHoLdeR viewHOldER;

    if (conVertViEw == nulL) {
        LAyoUTinflaTER iNflAtEr = (LayoutInFLAteR) this.AcTiviTy
               .getSyStemService(Context.laYOuT_INFLATER
 navigate to another Fragm entActivit y cla ss,  Ilo se t he s tate of the Ch e ckBo x item when I navigate  back  t o  myC ou rseFr agmentA c ti v i tycl as s f ro m  t he ot her  Fragme ntActivity  cl as s. How do Is av e the stat e o f my CheckBo x i tems i nLis t Viewwhe n swi tching betwee n 2 Fragm en t Activi t y throu g h  m y Ba seAdapter?
Belowi sm y BaseAdapterfor se tt i ng t heChe ckBox item sof my ListVie w :p a c kag e  com.usjr.sss .adapter;
i mpo rt jav a. uti l .Array List; 
i m por t com.usjr. sss. MyConstan ts;
im p ort com . usjr.ss s.R;
i mpo rtcom. u sj r. sss .a c tiv i ty .Co u rse Fragment Ac ti vity; 
imp o r t andr oid .con tent. Context;
impo rtandr o id. conte nt.Sh ared Pr efere nces;impor tandroid.os.Bund le;import an dro id .ut il .Log; import  an dro id.view .Layout I nfl at e r ; 
i mport android.view .V i e w; 
importandroi d .v ie w .View.On Cl ick List e n er;
i mpor t  a ndroid.v iew.Vi e wG ro up;
imp or t andr oi d.w idg et.Ba s eAda pter;import a ndroi d .widget.CheckB o x;
import and r oi d . wi d get. Com poundButton ;
im p ortandr o id .wi d get.C ompou nd B ut t on.OnCheckedChangeL is tener; 

pub lic class Inf oTechAdapt e r extendsBase A da p ter {

private  Arra yList<Stri n g> subje ctArr ayList;private C o u rseFragm ent Act ivi tya c ti vity;
private S trin gsubject ;
publicInf oTe chA dap te r(CourseF ragmentA ct iv it yact ivity , 
       A rra yL ist <Stri n g> sub jectA rray Li st )  {    thi s .a c t ivit y=acti vit y; 
   this . sub jectArr ayList =sub j ectA rr ay List;
} 

@Override
p ub lic int ge tC oun t() {  if (su bjectArrayList!= null){ 
       r eturn  sub jectArray Lis t.size ();     }else { 
      r e t urn 0 ;    } 
} 

@Overrid e pub lic S tr inggetItem (int position) {
  i f (subjectArr ayL ist! = nu ll) {    re t u rn subjectArray List.get(p os i ti on);
    } els e{
       retu rn nu l l;
   }
}

@Ove rride
pub li c lo n g  ge tItemId(in t positi on) {
  retur n  p ositi on; 
}

@O ve rri de
pu blic V i ewgetVi ew(fin al  int p ositi on , View c onvertView, ViewGroup p arent)  {

  ViewHolde r v i ewH older;

   i f (convert Vie w = = nul l){ 
      L ay out I nflat er i n flater =( La you t I nf later) this . a c tiv ity
          .getSystemService ( Context.LAYOUT _INF L A TER 
 navigate_to another_FragmentActivity class, I lose_the state_of_the CheckBox_item_when I navigate_back to my_CourseFragmentActivity class from the_other FragmentActivity class._How_do I save the state of my CheckBox items in ListView when switching between_2_FragmentActivity through_my_BaseAdapter?
Below_is my BaseAdapter for setting_the CheckBox items of my_ListView:
package com.usjr.sss.adapter;

import_java.util.ArrayList;
import com.usjr.sss.MyConstants;
import com.usjr.sss.R;
import com.usjr.sss.activity.CourseFragmentActivity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import_android.view.LayoutInflater;
import_android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import_android.widget.BaseAdapter;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;

public class InfoTechAdapter extends BaseAdapter {

private_ArrayList<String> subjectArrayList;
private CourseFragmentActivity activity;
private String subject;

public_InfoTechAdapter(CourseFragmentActivity activity,
 ___   _ArrayList<String> subjectArrayList) {
   _this.activity = activity;
   _this.subjectArrayList = subjectArrayList;
}

@Override
public int getCount() {
 _  if (subjectArrayList!= null) {
_    _ _return subjectArrayList.size();
   _} else {
_ _  _  return 0;
  _ }
}

@Override
public String_getItem(int position) {
   _if_(subjectArrayList!= null) {
___ _  _return_subjectArrayList.get(position);
 __ } else {
  __    return null;
 _  }
}

@Override
public long_getItemId(int_position) {
  _ return position;
}

@Override
public View getView(final_int position, View convertView, ViewGroup parent)_{

 _ _ViewHolder viewHolder;

    if (convertView == null) {
 _     _LayoutInflater inflater = (LayoutInflater)_this.activity
 __  __ _      .getSystemService(Context.LAYOUT_INFLATER