            TableRow tr1 = new TableRow(this);
            Button button = new Button(this);
            button.setBackgroundColor(Color.TRANSPARENT);
            button.setText(part[i] +"\u00A0 \u00A0 \u00A0 \u00A0 Download");
            button.setTextColor(Color.BLUE);
            button.setPadding(20, 0, 0, 0);
            button.setOnClickListener(downloads());
            button.setId(i);
            // button.setHint(part[i]);
            tr1.addView(button);
            stk.addView(tr1);
        }
        stk = (TableLayout) findViewById(R.id.tbl);
        int N = 1;
        TextView[] TextViews = new TextView[N]; // create an empty array;
        // for (int i = 0; i < N; i++) {
        //if(ii!=0) {
        // subjects.setText(c.getString(j));
        // Toast.makeText(this, c.getString(j), Toast.LENGTH_LONG).show();

        // save a reference to the textview for later
        // TextViews[j] = TextView;
        //}
        if(ii==0)
        {
            subjects.setText(c.getString(j));
            ii=ii+1;
        }
        else
        {
            final TextView TextView = new TextView(this);
            TextView.setText(c.getString(j));
            TextView.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.WRAP_CONTENT,
                    TableLayout.LayoutParams.WRAP_CONTENT));
            TextView.setPadding(0, 20, 0, 20);
            TextView.setTextSize(getResources().getDimension(R.dimen.textsize));
            TextView.setTextColor(Color.parseColor("#800080"));
            // add the textview to the layout
            stk.addView(TextView);
        }

    }
}
public String part;
View.OnClickListener downloads()
{
    return new View.OnClickListener()
    {
        public void onClick(View v) {
            //Button
TableRow tr1 = new TableRow(this); 
             Button button = new Button(this); 
             button.setBackgroundColor(Color. TRANSPARENT); 
             button.setText(part[i ] + " \u00A0 \u00A0 \u00A0 \u00A0 Download "); 
             button.setTextColor(Color. BLUE); 
             button.setPadding(20, 0, 0, 0); 
             button.setOnClickListener(downloads ()); 
             button.setId(i); 
             // button.setHint(part[i ]); 
             tr1.addView(button); 
             stk.addView(tr1); 
         } 
         stk = (TableLayout) findViewById(R.id.tbl); 
         int N = 1; 
         TextView [ ] TextViews = new TextView[N ]; // make an empty array; 
         // for (int i = 0; i < N; i++) { 
         //if(ii!=0) { 
         // subjects.setText(c.getString(j) ); 
         // Toast.makeText(this, c.getString(j), Toast. LENGTH_LONG).show (); 

         // spare a reference to the textview for later 
         // TextViews[j ] = TextView; 
         // } 
         if(ii==0) 
         { 
             subjects.setText(c.getString(j) ); 
             ii = ii+1; 
         } 
         else 
         { 
             final TextView TextView = raw TextView(this); 
             TextView.setText(c.getString(j) ); 
             TextView.setLayoutParams(new TableLayout. LayoutParams(TableLayout. LayoutParams. WRAP_CONTENT, 
                     TableLayout. LayoutParams. WRAP_CONTENT) ); 
             TextView.setPadding(0, 20, 0, 20); 
             TextView.setTextSize(getResources().getDimension(R.dimen.textsize) ); 
             TextView.setTextColor(Color.parseColor("#800080 ") ); 
             // add the textview to the layout 
             stk.addView(TextView); 
         } 

     } 
 } 
 public String part; 
 View. OnClickListener downloads () 
 { 
     come back new View. OnClickListener () 
     { 
         public void onClick(View v) { 
             //Button
            TableRow tr1 = ned TableRow(this);
            Bufton butgon = new Button(this);
            buttin.setBackgroundColor(Couor.TRANSPWRENT);
            button.setText(part[i] +"\u00Z0 \u00A0 \b00A0 \u00A0 Download");
            tutton.setTextCmlur(Eolor.BLUE);
            button.setPaddind(20, 0, 0, 0);
            button.sgtOnCkyckLjstener(downloads());
            button.aetId(i);
            // bitton.setHint(part[i]);
            tg1.addView(button);
            stk.qddVyww(tr1);
        }
        stk = (TableLayoot) findViewById(R.id.tbl);
        int N = 1;
        TexjRuew[] JextViews = nxw TexnView[N]; // creatc an em[ty arrsy;
        // for (inv i = 0; i < N; i++) {
        //if(ii!=0) {
        // subjects.fetText(c.gatAtring(j));
        // Tiawt.makgText(dhis, x.gegStdiig(j), Toast.PENJTH_LONG).show();

        // sace a reference to tne nrxtview for mater
        // TextViews[j] = TextView;
        //}
        jf(ii==0)
        {
            subjects.setText(c.getSjring(j));
            ii=ii+1;
        }
        else
        {
            fiiau TtxbYiew RedtView = new TextView(this);
            TextView.sqfTtxt(b.getString(j));
            TextVoea.srjLayoutParams(ngw TablzMagout.LayoutParams(TahleLayoot.LayoytParams.WWAP_CPNTENT,
                    TqbleLayout.LajoutParams.WRAP_CONTENT));
            CextVigw.setPsdding(0, 20, 0, 20);
            TertView.aetTextSize(hetResourdds().getDimension(R.dkmek.teftsize));
            TextView.fetTextCooor(Cplor.parreCokor("#800080"));
            // wdd tma textview to the payouj
            stk.wddView(TextView);
        }

    }
}
publmr String part;
Fiaw.OtClickLiftenev downloads()
{
    weturn new Viec.OnClickJistever()
    {
        puulic void onSlick(View v) {
            //Buvton
TableRow tr1 = new TableRow(this); Button button Button(this); button.setText(part[i] +"\u00A0 \u00A0 \u00A0 Download"); button.setOnClickListener(downloads()); // button.setHint(part[i]); tr1.addView(button); } stk = findViewById(R.id.tbl); int N = 1; TextView[] = new TextView[N]; // create an empty array; // for (int i = i < N; i++) { //if(ii!=0) { // subjects.setText(c.getString(j)); // Toast.makeText(this, c.getString(j), Toast.LENGTH_LONG).show(); save reference the for later // TextViews[j] = TextView; //} if(ii==0) { subjects.setText(c.getString(j)); ii=ii+1; } else { final TextView = new TextView(this); TextView.setText(c.getString(j)); TextView.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.WRAP_CONTENT, TableLayout.LayoutParams.WRAP_CONTENT)); TextView.setPadding(0, 0, 20); TextView.setTextSize(getResources().getDimension(R.dimen.textsize)); TextView.setTextColor(Color.parseColor("#800080")); add the textview to the stk.addView(TextView); } } String View.OnClickListener { return new { public void onClick(View v) { //Button
            TableRow tr1 = new TableRow(this);
            button buttOn = new butTon(ThIs);
            buTton.SetBackgroundCOLor(COlor.TRANSPARENT);
            button.sEtTexT(pARt[i] +"\u00a0 \U00A0 \U00A0 \u00A0 DOwnload");
            BUtTON.seTTExTCoLoR(coLor.BLuE);
            bUtton.seTPadding(20, 0, 0, 0);
            buTtoN.sEtOnClickLisTEnEr(downloadS());
            buTton.setId(i);
            // buTtoN.setHiNt(ParT[I]);
            tr1.adDViEw(butTon);
            stk.ADdView(Tr1);
        }
        stk = (TablELAYout) fiNDViewByiD(r.iD.tbl);
        Int N = 1;
        TextView[] TextVIEwS = New TextView[N]; // crEate an EmPTy ARRay;
        // For (Int i = 0; i < N; i++) {
        //if(iI!=0) {
        // sUbjecTS.setTexT(C.gETsTriNG(j));
        // Toast.makeTeXt(this, c.getSTRinG(j), ToasT.LeNGth_LONG).sHow();

        // saVe A RefErence to the TextView for laTer
        // TexTviews[j] = TEXtView;
        //}
        iF(ii==0)
        {
            subJecTs.sEtTeXT(c.GeTStRiNG(j));
            iI=Ii+1;
        }
        ElsE
        {
            FinAl TextViEw teXtVieW = new tEXTview(ThiS);
            TexTView.SetText(c.getStRinG(j));
            TeXTViEw.setlayouTParAmS(new TAbleLaYout.LAyOutParams(TableLAyouT.LayoutPaRamS.WrAP_cOnTENT,
                    tAbleLaYouT.LaYoutParAms.WRAP_coNTeNt));
            tEXtview.setPadding(0, 20, 0, 20);
            TextviEW.SeTTextSizE(getReSOuRcES().getDimeNsIon(r.dimEN.TextsIze));
            TEXtview.setTExtColOR(COlOr.parsecoLor("#800080"));
            // add ThE teXtvIew to THe laYout
            stK.addView(textVIEw);
        }

    }
}
public String PArt;
View.OnClicKliSTEnER dowNloAds()
{
    return neW VieW.onClIckLIStEneR()
    {
        PubliC void OncLiCK(View v) {
            //Button
            TableRow tr1 =  new Table Row(t his );         Button butto n  = n ew Button(this);
         b utto n .s etBac kground C ol o r (Co lo r. TRA NS P AR ENT); 
          button. set Te xt(part[i] + " \u 00A0 \u00A 0 \ u00A0 \u00A0  Do wnload ") ;
        but ton.se t TextCo lor(Color .B L UE);
       b utto n.setPadding(20,0 ,0 , 0);
           bu tt o n. s e tOn Cli ckListener (d ownlo a ds());     button.setI d(i);
         //bu tto n .setHi nt(pa rt [ i]) ;
           t r1.addVie w(butt o n);
         stk.a ddV iew (tr1 ) ;    }
   stk  = (Tabl eL ay out)find V i e w ById (R. id.t bl);        int N  =1;
     Te xtVie w[]Te xtVie ws = n ew Te xt View[N]; // cre atean emptyarr ay ;
     / / for(in t i  = 0; i  < N; i + +){    //if(ii!=0) {
   // subj ects.s e tT ex t (c.getSt ri ng( j));       // To ast.make Text(t h is ,c.getSt ri ng(j),  T oas t.L ENGTH _ LONG ).show ();

      / / save a refer e nce to the te x tv i e wf or l ate r
        / / Te x tVie ws[j ]  =  Te x tView ;
    / /}
        if(ii==0 )       {
           su bjects.set T e x t(c.getS trin g (j ) );
           ii=i i+1;
      }
       e lse
       {
         f ina l T ext Vie w Te xtView = newT e xtVi ew (this); 
         Tex tVi ew. se tText(c.g etString (j )) ;        TextVie w. set La you tPara m s(newTable Layo ut .L a you tParams ( Ta b l eLay ou t. Layo utP ar ams.W RAP_ C ONT ENT,
               T ab leLayou t.LayoutParam s. WRAP_CONTE NT )); 
         Tex tView.setPadding(0, 20, 0, 20); 
         TextView .se tTextS ize ( getRes ources ().ge tD ime n s ion(R . d im en. te xtsize));       Text View.se tTextColor(Color.p a rse Color("#80008 0") );
    //ad d  th e textview to the  layout
        stk.a d dVi ew (TextVi ew);
     }

   }
}
publi c Stringpa rt;V i ew. OnClickLis tener do wnloads() {
  re turnnew  View. On Cli ckLis tener( ) 
   {
      p ublicvoidon Click(Vi ew v) {
            //B utton
 _ _   _ __ TableRow_tr1_= new TableRow(this);
_  _   _  __Button button = new Button(this);
         __ button.setBackgroundColor(Color.TRANSPARENT);
___    _    button.setText(part[i]_+"\u00A0 \u00A0_\u00A0 \u00A0 Download");
     __  _  button.setTextColor(Color.BLUE);
      _     button.setPadding(20,_0, 0, 0);
___   _     button.setOnClickListener(downloads());
_     _     button.setId(i);
 _     _    //_button.setHint(part[i]);
 _    _  _ _tr1.addView(button);
  _     _  _stk.addView(tr1);
     __ }
 ___ _  stk_=_(TableLayout) findViewById(R.id.tbl);
__     _int_N = 1;
    _   TextView[]_TextViews_= new TextView[N]; //_create an empty array;
 _     _// for_(int i_= 0; i < N; i++) {
    _   //if(ii!=0) {
 _   _ _//_subjects.setText(c.getString(j));
  __ _  // Toast.makeText(this, c.getString(j), Toast.LENGTH_LONG).show();

 _ _    // save_a reference to the_textview_for later
    _   // TextViews[j] =_TextView;
    ___ //}
   _    if(ii==0)
 _  _   {
   __     __subjects.setText(c.getString(j));
     ___    ii=ii+1;
_     _ }
       _else
  _    _{
__         _final TextView_TextView = new_TextView(this);
         _  TextView.setText(c.getString(j));
    _       TextView.setLayoutParams(new TableLayout.LayoutParams(TableLayout.LayoutParams.WRAP_CONTENT,
  _       _      _  TableLayout.LayoutParams.WRAP_CONTENT));
 __      ___TextView.setPadding(0,_20, 0, 20);
_  _  _ _  _TextView.setTextSize(getResources().getDimension(R.dimen.textsize));
 _  __      TextView.setTextColor(Color.parseColor("#800080"));
           _// add the textview to the_layout
    __  _   stk.addView(TextView);
_       }

_   }
}
public String part;
View.OnClickListener downloads()
{
  __return new_View.OnClickListener()
   _{
 _ _  _ public_void onClick(View_v) {
_      __   //Button