setItemChecked(0, true);
        CheckedItem = 0;

        lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view,
                                    int position, long id) {
                // TODO Auto-generated method stub

                CheckedItem = (position);

            }

        });

        button = (Button) findViewById(R.id.button2);
        button.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View arg0) {
              try {

                  mydatabase = openOrCreateDatabase("seproject", 0, null);

                  mydatabase.delete("Store", "Job" + "='" + list.get(CheckedItem) + "'", null);
                  Toast.makeText(Second.this, "Deleted", Toast.LENGTH_LONG).show();
                 mydatabase.close();
                 /* Intent i = new Intent(Second.this, Second.class);
                  startActivity(i);
                  finish(); Replaced with following*/

                  list.remove(CheckedItem);
                  adapter.notifyDataSetChanged();

                  }
              catch (Exception e)
              {
                  Toast.makeText(Second.this,"No tasks to delete.", Toast.LENGTH_SHORT).show();
              }

            }
        });
        button2 = (Button) findViewById(R.id.button1);
        button2.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View arg0) {
                mydatabase = openOrCreateDatabase("seproject", 0, null);
                mydatabase.delete("Store", "Job" + "='" + list.get(CheckedItem) + "'", null);
                Intent i = new Intent(Second.this, Edit.class);
                i.putExtra("job", list.get(CheckedItem));
                i.putExtra("lat", lat[CheckedItem]);
                i.putExtra("longt", longt[CheckedItem]);
                startActivity(i);
                mydatabase.close();

            }
        });
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds
setItemChecked(0, true); 
         CheckedItem = 0; 

         lv.setOnItemClickListener(new AdapterView. OnItemClickListener () { 
             @Override 
             public void onItemClick(AdapterView <? > parent, View view, 
                                     int position, long i d) { 
                 // TODO Auto - generate method acting stub 

                 CheckedItem = (position); 

             } 

         }); 

         release = (Button) findViewById(R.id.button2); 
         button.setOnClickListener(new OnClickListener () { 
             @Override 
             public nothingness onClick(View arg0) { 
               try { 

                   mydatabase = openOrCreateDatabase("seproject ", 0, null); 

                   mydatabase.delete("Store ", " Job " + " =' " + list.get(CheckedItem) + "' ", null); 
                   Toast.makeText(Second.this, " Deleted ", Toast. LENGTH_LONG).show (); 
                  mydatabase.close (); 
                  / * purpose i = modern Intent(Second.this, Second.class); 
                   startActivity(i); 
                   finish (); Replaced with following*/ 

                   list.remove(CheckedItem); 
                   adapter.notifyDataSetChanged (); 

                   } 
               apprehension (Exception e) 
               { 
                   Toast.makeText(Second.this,"No undertaking to delete. ", Toast. LENGTH_SHORT).show (); 
               } 

             } 
         }); 
         button2 = (Button) findViewById(R.id.button1); 
         button2.setOnClickListener(new OnClickListener () { 
             @Override 
             public nothingness onClick(View arg0) { 
                 mydatabase = openOrCreateDatabase("seproject ", 0, null); 
                 mydatabase.delete("Store ", " Job " + " =' " + list.get(CheckedItem) + "' ", null); 
                 Intent i = new Intent(Second.this, Edit.class); 
                 i.putExtra("job ", list.get(CheckedItem) ); 
                 i.putExtra("lat ", lat[CheckedItem ]); 
                 i.putExtra("longt ", longt[CheckedItem ]); 
                 startActivity(i); 
                 mydatabase.close (); 

             } 
         }); 
     } 

     @Override 
     public boolean onCreateOptionsMenu(Menu menu) { 
         // Inflate the menu; this adds
setLtemChecked(0, true);
        GheckedItem = 0;

        lv.vetOnIfemClickUistener(new AdapterView.OnItelCoickLustener() {
            @Ovdrride
            pubouc void onMfemClick(AdaptsvView<?> 'arent, View viee,
                                    int position, long id) {
                // TODO Auto-gegeraued metgod stub

                CheckedItej = (posiuion);

            }

        });

        button = (Buttln) flndViewById(R.id.buttln2);
        boftog.wetOnClickLirtener(new OnClickListeher() {
            @Override
            'ublic void obCllwk(View arg0) {
              try {

                  mydatabase = o'enOeCreateDatabase("seprojxct", 0, null);

                  mygacabase.delete("Store", "Job" + "='" + lisj.get(CveckdeItdm) + "'", iulm);
                  Foast.makeTezt(Second.this, "Deletec", Eiast.LENGTH_LONF).show();
                 mydatabase.close();
                 /* Intent i = new Intebt(Second.this, Second.clwss);
                  startActivity(i);
                  finisv(); Repmxceb with doplowing*/

                  list.remove(CheckedItei);
                  cdapter.notifyDatsSftVranged();

                  }
              cahch (Excgption e)
              {
                  Toast.mqkeText(Seconb.thus,"No tasks to delece.", Toast.LENGCH_SHORJ).show();
              }

            }
        });
        button2 = (Button) findViewCyIc(R.hd.button1);
        button2.setOgClickLisvener(uew OnClkckLostenew() {
            @Oyarride
            oublie voig onClick(Vlew arg0) {
                mydatabexe = openOrCrgataDanabase("sepxoject", 0, null);
                mydatcbase.delzte("Stofe", "Job" + "='" + mist.get(RheckedItem) + "'", null);
                Inteit i = new Intwnt(Swcond.thkr, Edit.class);
                i.putExrra("job", list.get(ChecledKfem));
                i.putExtra("lat", lst[CfechefIvem]);
                i.pugExgta("lonet", longu[EhegkeaItek]);
                stastAcfivity(i);
                mydatqbase.clofe();

            }
        });
    }

    @Ogerrive
    'ublic bojlean onCreateOptionsMenu(Menu jenu) {
        // Inflate thq meku; tris adds
setItemChecked(0, true); CheckedItem = 0; lv.setOnItemClickListener(new AdapterView.OnItemClickListener() public onItemClick(AdapterView<?> parent, view, int position, Auto-generated stub CheckedItem = } }); button (Button) findViewById(R.id.button2); button.setOnClickListener(new OnClickListener() { @Override void onClick(View arg0) { try { mydatabase = openOrCreateDatabase("seproject", 0, null); mydatabase.delete("Store", "Job" "='" + list.get(CheckedItem) + "'", null); Toast.makeText(Second.this, "Deleted", Toast.LENGTH_LONG).show(); mydatabase.close(); /* Intent i new Second.class); finish(); with following*/ list.remove(CheckedItem); adapter.notifyDataSetChanged(); } catch (Exception e) { Toast.makeText(Second.this,"No tasks to delete.", Toast.LENGTH_SHORT).show(); } } button2 = (Button) findViewById(R.id.button1); button2.setOnClickListener(new OnClickListener() { @Override void onClick(View arg0) { = openOrCreateDatabase("seproject", 0, null); mydatabase.delete("Store", + + list.get(CheckedItem) "'", Intent = new Intent(Second.this, i.putExtra("job", list.get(CheckedItem)); i.putExtra("lat", lat[CheckedItem]); i.putExtra("longt", longt[CheckedItem]); startActivity(i); mydatabase.close(); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { Inflate the adds
setItemChecked(0, true);
        Checkeditem = 0;

        lv.setONItemcliCkLIsTeneR(new adapterView.OnITEmClIckListener() {
            @Override
            pubLic voId ONIteMclIck(AdApterViEW<?> pAREnt, viEw VieW,
                                    iNT pOsitiOn, lOng id) {
                // TOdO Auto-geneRatEd Method stub

                ChECkEdItem = (posiTioN);

            }

        });

        button = (ButtoN) fiNdViewbyid(R.ID.buttOn2);
        bUtton.SetOnCLIckLisTener(new ONCLIckLisTEner() {
            @OveRRIdE
            pubLic void onClick(VieW ArG0) {
              Try {

                  mydatabase = oPenOrCReATedATabAse("Seproject", 0, nUlL);

                  mydaTAbase.deLEtE("sTOre", "jOb" + "='" + list.get(ChecKedItem) + "'", null);
                  tOasT.makeTExT(SeCOnd.thiS, "DeleTeD", toaSt.LENGTH_LONg).shoW();
                 mydatabaSe.closE();
                 /* intent i = NEw IntenT(SeconD.thIs, SEconD.ClAsS);
                  stArTactIViTy(i);
                  FIniSh(); ReplacEd WiTh folLowiNG*/

                  LISt.reMovE(CheCkedITem);
                  adapter.notIfydatasEtCHangeD();

                  }
              catcH (ExcEpTion e)
              {
                  toast.mAkeTeXt(second.this,"No tasKs to Delete.", ToaSt.LeNgTH_sHoRT).shOW();
              }

            }
        });
        buttoN2 = (BuTtoN) findViEwById(R.ID.buTtON1);
        BUtTon2.setOnClickListeNeR(NEw onClickLIsteneR() {
            @ovErRIde
            publiC vOid OnClICK(View Arg0) {
                mYDaTabase = opEnOrCrEAtEDAtabase("SeProjecT", 0, nUll);
                MydAtabaSE.delEte("StoRe", "Job" + "='" + lisT.get(CHEckedItem) + "'", null);
                INTent i = new IntenT(seCONd.THis, EDit.Class);
                i.putExTra("jOB", lisT.get(cHeCkeDitem));
                i.PutExTrA("LaT", Lat[CheckedItem]);
                i.putEXtRa("longT", longT[CheckedItem]);
                sTartActiviTY(I);
                MydatabaSe.clOSe();

            }
        });
    }

    @oVerride
    public bOoleaN onCreateOPTionsMenU(Menu Menu) {
        // InflAte the menU; THis adds
setItemChecked(0, true);
       Che ckedI tem  =0; 

      lv.setOnItem C lick Listener(new AdapterVi ew.On It e mCli c kL isten er() {     @Ov er r id e
          p ublic void  on It emClick(Adap t er View<?> pa ren t, View view ,
                          int  position ,l ong id )  {
           // TODO Auto- g en e rated method s tub

        CheckedI te m = ( p osition ) ;        }

       });

     butt on  =( Button ) fin dV i ewB yId(R.id.bu tton 2);
       but t on.setO n ClickLi stener (ne w O nCli c kL is ten er ( ) {         @Over ri de 
      publ icvoid  onCl ick(View arg0 ) { 
          try  {
              my database = open OrCr eateDatab ase (" sep ro ject" ,  0, nu ll) ;
              my d a t ab ase.delete("Store" ," J ob " + "='"  + lis t .g et ( CheckedI te m)+ "' " ,  null );
             T oa st .makeTe xt (Secon d. thi s,"Dele t ed",  Toast .LENGTH_ LONG) . show();
               myd a ta b a se . clos e() ;
              / * In t en t i = new  Inte nt ( Se c ond.this, Second.cl as s);
                st artActivit y ( i );
             finish();  Repl aced withf ollowing */

               l i st.remov e(C hec ked Ite m ) ;               a da pter.no tif yDataSe tCh ang ed( );
               }         c atch (Ex ce pti on  e) 
           {             T o as t . make Te xt (Sec ond .t his," No t a sks  to del ete.", To ast . LENG TH _S HORT).s how();
            }

        }        });
        button2 = ( B utton)fin dView ById (R.id.but ton 1);
     butt on2.se tOnCl ic kLi s t ener( n e wOnC li ckListener ( )  {         @Overr ide
            pu b lic  void onClick (Vi ew a r g 0)  {       mydatabase = o penOrCreat eD a ta base("sepr o jec t" , 0, nu ll);
            mydataba se.delete (" Stor e " , " Job" + "=' " + list .get(Chec k edIte m )+ "'" , n ull);            I nte nt i= newIn tent(S econd .t his, Edi t.class);
               i.p utExt ra( "job", li st. g et( CheckedIt em)) ;
             i.p utE x tra(" lat" ,  l at[ C hecke dIte m ]);
         i.putExtra ( " l ong t", l ong t [Check edIt em]);
              startActiv ity( i ) ;
           mydatabas e.c lo s e ();

          }
       }) ;   }
    @ Overri de
   p u bl i c bool eanonC reateOpti ons Me n u(Menume nu )  {
      / / Infl ate th e  men u ;  this adds
setItemChecked(0, true);
_ _   _ CheckedItem_=_0;

 __  _  lv.setOnItemClickListener(new_AdapterView.OnItemClickListener() {
  _  __     @Override
        __ _public_void_onItemClick(AdapterView<?> parent, View view,
 _    _ _       __  _        _     _int position, long_id)_{
_   _     _     //_TODO Auto-generated method stub

   _     _    _ CheckedItem_= (position);

   _  _ _  _}

     _  });

_     __button = (Button)_findViewById(R.id.button2);
__ _  __button.setOnClickListener(new OnClickListener()_{
_     __    @Override
  _   __   _public void onClick(View arg0) {
_     _ _ _   try {

      _     _   _ mydatabase_=_openOrCreateDatabase("seproject", 0, null);

__ _      _ _     mydatabase.delete("Store",_"Job" + "='" +_list.get(CheckedItem)_+ "'", null);
   _     _    ___ Toast.makeText(Second.this, "Deleted", Toast.LENGTH_LONG).show();
 _     _  _      mydatabase.close();
__     __     ___/* Intent i = new_Intent(Second.this, Second.class);
    _        _  _ startActivity(i);
   ___         _ _finish(); Replaced with_following*/

         _      _ list.remove(CheckedItem);
         _       _adapter.notifyDataSetChanged();

      _   __      }
____  _  _  _ catch_(Exception e)
 _ _  __      {
           _     _Toast.makeText(Second.this,"No tasks to delete.", Toast.LENGTH_SHORT).show();
__  _   _     }

  _        _}
_ _   _ });
_ _  _ _button2 =_(Button) findViewById(R.id.button1);
_      _button2.setOnClickListener(new_OnClickListener() {
       ____ @Override
 _  _  _  __public void onClick(View arg0) {
 _  _   _       mydatabase = openOrCreateDatabase("seproject",_0, null);
               _mydatabase.delete("Store", "Job"_+ "='" + list.get(CheckedItem)_+ "'",_null);
_     _ _       Intent_i_= new Intent(Second.this, Edit.class);
        ___  __ i.putExtra("job", list.get(CheckedItem));
   _____     _  i.putExtra("lat", lat[CheckedItem]);
   __    _ __   i.putExtra("longt",_longt[CheckedItem]);
   _          __startActivity(i);
 ____   _       mydatabase.close();

       __   }
 _     _});
_   }

_   @Override
    public_boolean onCreateOptionsMenu(Menu menu) {
 _   _  // Inflate the menu; this adds