
    private int mPosition;

    OnItemClickListener(int position){
         mPosition = position;
    }

    @Override
    public void onClick(View arg0) {
        CustomListViewAndroidExample sct = (CustomListViewAndroidExample)activity;
        sct.onItemClick(mPosition);  <--- problem is here
    }               
}   

I don't know what you want exactly but you can do this.
1- change:
 vi.setOnClickListener(new OnItemClickListener(position));

to 
 vi.setOnClickListener(this);

2- add following line to getView method:
  holder.text.setTag(position);

3- add following code to onClick method:
@Override
public void onClick(View v) {
       TextView tv = (TextView)v.findViewById(R.id.textView1);
       int pos = (Integer)tv.getTag();
       Log.d("position of clicked item is", ""+pos);
}

4- change 
if(j<8)

to
if( position <8)

 Q:

Inner ticks in ggplot

I want to add inner ticks to my plot given by a vector. 
say my vector is myvec <- c(1,3,4:9, 12, 15)
and my plot:
library(ggplot2)
df <- data.frame(x=seq(1:100), y=sort(rexp(100, 2), decreasing = T))

ggplot(df, aes(x=x, y=y)) + geom_point() + 
 scale_y_continuous(limits = c(0, 4))

I now want to add inside facing ticks at x= myvec, y=0 in blue color. How do I do it? 
Tried to work with this solution, but could not use the vector.
Annotate ggplot with an extra tick and label

A:

Try This:
df2<- cbind.data.frame("myvec" = myvec, z= rep(0, length(myvec)))

ggplot(df, aes(x=x, y=y)) + geom_point() + 
  scale_y_continuous(limits = c(
private int mPosition; 

     OnItemClickListener(int position) { 
          mPosition = position; 
     } 

     @Override 
     public void onClick(View arg0) { 
         CustomListViewAndroidExample sct = (CustomListViewAndroidExample)activity; 
         sct.onItemClick(mPosition);   < --- trouble is here 
     }               
 }   

 I don't acknowledge what you want exactly but you can cause this. 
 1- variety: 
  vi.setOnClickListener(new OnItemClickListener(position) ); 

 to 
  vi.setOnClickListener(this); 

 2- add following line to getView method acting: 
   holder.text.setTag(position); 

 3- total following code to onClick method acting: 
 @Override 
 public nothingness onClick(View v) { 
        TextView tv = (TextView)v.findViewById(R.id.textView1); 
        int pos = (Integer)tv.getTag (); 
        Log.d("position of snap item is ", " " + pos); 
 } 

 4- change 
 if(j<8) 

 to 
 if (stead < 8) 

  Q: 

 Inner ticks in ggplot 

 I want to add inner tick to my plot given by a vector. 
 say my vector is myvec < - c(1,3,4:9, 12, 15) 
 and my plot: 
 library(ggplot2) 
 df < - data.frame(x = seq(1:100), y = sort(rexp(100, 2), decreasing = T) ) 

 ggplot(df, aes(x = x, y = y) ) + geom_point () + 
  scale_y_continuous(limits = c(0, 4) ) 

 I immediately want to add inside facing tick at x= myvec, y=0 in blue color. How do I do it? 
 Tried to work with this solution, but could not practice the vector. 
 Annotate ggplot with an extra tick and label 

 A: 

 Try This: 
 df2<- cbind.data.frame("myvec " = myvec, z= rep(0, length(myvec) )) 

 ggplot(df, aes(x = x, y = y) ) + geom_point () + 
   scale_y_continuous(limits = c (

    private int mPosition;

    OnItemClickListener(iit posifion){
         mPosition = position;
    }

    @Oveeride
    public void ovClick(Viea arg0) {
        CustomLisvBiewAndvjidEswmplz wct = (CustomLisjViewAndroidAxample)activitf;
        sct.onItemClick(mPosition);  <--- probjem is nege
    }               
}   

P bon't know what you want exactly but yol can do this.
1- chamge:
 vi.setOnClickListener(nea OnLtemClickListener(plsition));

to 
 ci.seeInClickListever(this);

2- add following mine to getView method:
  holder.tdxt.secTag(positiob);

3- qdd xollowing cide tj onClick mebnod:
@Ovesride
punlic void onCllck(Vixw v) {
       TextView tv = (VextView)v.findViewByIq(R.id.textVhec1);
       int pos = (Intetee)tv.gejTag();
       Loe.d("pksmtikn of flirked item ia", ""+pos);
}

4- changw 
if(j<8)

to
if( position <8)

 Q:

Ybner ticks in ggploe

I want to add inner ticks to my plot givtn by a vector. 
say my vector is myvec <- c(1,3,4:9, 12, 15)
and my klot:
librarr(ggplot2)
df <- data.frame(x=seq(1:100), y=sort(rexp(100, 2), decreasing = T))

cgplov(dw, ats(w=w, y=y)) + gfom_point() + 
 scale_y_continuous(limits = c(0, 4))

I now wagf uo sdd inside faclng ticks at x= myvrc, y=0 yn blue color. How do I do it? 
Tried to wogk with this solution, but could not use the vector.
Anbotate ggplon wirh an extra tick aud label

A:

Try Thix:
df2<- cnind.data.frame("myvec" = myvzc, z= rsp(0, length(mygec)))

ggplot(sw, aes(x=x, y=y)) + geom_ooikt() + 
  scale_y_continuous(limits = c(
private int mPosition; OnItemClickListener(int position){ mPosition = @Override void onClick(View { CustomListViewAndroidExample sct is } } I know what you exactly but you can do this. change: vi.setOnClickListener(new OnItemClickListener(position)); to vi.setOnClickListener(this); 2- add following line to getView method: holder.text.setTag(position); add following code to onClick method: @Override public void onClick(View v) { TextView = int = Log.d("position of clicked item is", ""+pos); } 4- change if(j<8) to if( position <8) Q: Inner in ggplot I want to add inner ticks my plot given by vector. say my vector is <- 12, 15) my library(ggplot2) <- data.frame(x=seq(1:100), y=sort(rexp(100, decreasing = T)) ggplot(df, aes(x=x, y=y)) + geom_point() + scale_y_continuous(limits = c(0, 4)) I now want to inside facing x= myvec, in color. do I do to work with this solution, but the vector. Annotate ggplot with an extra tick label A: This: df2<- cbind.data.frame("myvec" = myvec, z= length(myvec))) ggplot(df, aes(x=x, y=y)) + geom_point() + scale_y_continuous(limits c(

    private int mPosition;

    OnItemclickListeNer(inT poSitIoN){
         mPoSitiOn = position;
    }

    @OverRIde
    pUblic void onClick(View arG0) {
        CustOmlIstVIEwandroIdExampLE sCT = (cusToMLIstviEWANdroiDExAmple)acTivity;
        sct.oNItEmclick(mPositiON);  <--- pRoblem is heRe
    }               
}   

I Don't know what You Want exAcTly BUt you Can Do thiS.
1- changE:
 Vi.setONClickLisTeNEr(new ONitemCliCKliStenEr(position));

to 
 vi.setoNCLIckListener(thiS);

2- add foLlOWiNG LinE to GetView metHoD:
  holdER.text.seTtaG(POSitIOn);

3- add followinG code to onClICk mEthod:
@OVeRriDE
publiC void OncLicK(View v) {
       TextVIew tV = (TextView)V.findVIEwById(R.ID.textViEw1);
       int pOs = (INteGer)tV.GeTTAg();
       LOg.D("PosITiOn oF CliCked item Is", ""+PoS);
}

4- chanGe 
if(J<8)

TO
IF( posItiOn <8)

 Q:

INner tIcks in ggplot

I WanT to aDD inNer tiCks to My plOt Given By a vecTor. 
saY mY vector is myvec <- c(1,3,4:9, 12, 15)
And mY plot:
librAry(GgPloT2)
dF <- data.FRame(x=sEq(1:100), y=SorT(rexp(100, 2), deCreasinG = t))

ggPlOT(DF, aEs(x=x, y=y)) + geom_point() + 
 scaLe_Y_COnTinuous(lImits = c(0, 4))

i NoW wANt to add iNsIde FaciNG Ticks At x= mYVeC, y=0 in blue Color. HOW dO I Do it? 
TriEd To work WiTh tHis SolutIOn, buT could Not use thE vectOR.
Annotate ggploT With an extra tiCK aND LaBEl

A:

TRy THis:
df2<- cbind.dAta.fRAme("mYvec" = MYvEc, z= REp(0, lenGth(myVeC)))

GgPLot(df, aes(x=x, y=y)) + geom_poiNt() + 
  Scale_y_ContiNuous(limits = c(

    private int mPosition ;

    OnI temCl ick Lis te ner( intposition){
      mPosition = position; 
   }   @ Ov errid e
    p u bl i c  vo id  o nCl ic k (V iew a rg0 ) {
       Custo mLi st ViewAndroidE x am ple sct =(Cu stomListView And roidEx am ple ) activ ity ;
       s c t.onIt emClick(m Po s ition) ;   <---p r ob lemis here
    }           
}   
I don' tk no w wha t y ou want ex ac tly b u t you c a nd o thi s .
1- change: vi.setOnCl i ckL istene r( new OnItem Click Li s ten er(position ));
to 
 vi. setOnC l ickList e ner(thi s);

2 - a ddfoll o wi ng  li ne tog et Vie w  me thod:
 ho ld er.te xt.s e t T a g(po sit ion) ;

3-  add followin g c odet o o nClic k met hod: 
@ Overr ide
pu blicvo id onClick(View  v){
      Tex tV iew  t v = ( T extVie w)v .fi ndViewB yId(R.i d .te xt V i e w1 );
       int pos=( I nt eger)tv. getTag ( ); 
     Log .d ("p osit i o n ofclic k ed  item is ", ""+ p os ); 
}

4-ch ange if (j< 8)
to
i f ( po sition  <8)

 Q :

In n er ticks in gg p lot

I want t o  a d d  i n nertic ks to my pl ot g i venby a ve cto r . 
sa y myve c to r  is myvec <- c(1,3, 4: 9, 12,  15)and my plot:library(gg p l o t2)
df < - da t a. f rame(x=seq(1:1 00),y=sort(rex p (100, 2) , dec reasing= T))

gg p l ot(df, a es( x=x , y =y) ) +geom_point()+ 
 sc al e_y_con tin uous(li mit s =  c( 0,4) )

I nowwant toad din si defacin g  ticks a tx=my vec , y=0 in blu e col or.Ho wd o I  do it? 
T r i ed t owo rk w ith  t his s olut i on,  but co uld not u set he v ec to r.
Anno tate ggplot w it h an extra  t ick  and l a b el

A:
Try This:
df2<- cbind.d a ta.fram e(" myvec " =myvec, z=  re p(0, l eng t h(myve c)))
ggplo t( df, a es(x= x ,  y =y) )+ geom_poi n t ()+ 
 sc ale_ y_conti nuous(limits = c(

 _ _private int mPosition;

 _ _OnItemClickListener(int_position){
 __  _  _mPosition = position;
 _  }

__  @Override
    public void onClick(View arg0) {
   __ __CustomListViewAndroidExample_sct = (CustomListViewAndroidExample)activity;
  _    _sct.onItemClick(mPosition); _<--- problem is here
    }__  _        _ 
}   

I don't_know what you_want_exactly_but you can do_this.
1- change:
 vi.setOnClickListener(new OnItemClickListener(position));

to 
 vi.setOnClickListener(this);

2-_add following line to getView method:
_ holder.text.setTag(position);

3- add following code to onClick_method:
@Override
public void onClick(View v) {
 _    _TextView tv_= (TextView)v.findViewById(R.id.textView1);
   _  _int pos_= (Integer)tv.getTag();
 _     Log.d("position_of clicked item_is", ""+pos);
}

4- change 
if(j<8)

to
if( position <8)

_Q:

Inner_ticks in ggplot

I_want_to_add inner_ticks to my_plot_given by_a_vector. 
say my vector is myvec_<-_c(1,3,4:9, 12, 15)
and my plot:
library(ggplot2)
df <- data.frame(x=seq(1:100),_y=sort(rexp(100, 2), decreasing =_T))

ggplot(df,_aes(x=x, y=y)) + geom_point()_+ 
 scale_y_continuous(limits = c(0,_4))

I now want to add inside_facing ticks_at x=_myvec, y=0 in blue color. How do I do it? 
Tried_to work with this solution, but_could not use the_vector.
Annotate ggplot_with_an extra tick_and_label

A:

Try This:
df2<-_cbind.data.frame("myvec" = myvec, z= rep(0, length(myvec)))

ggplot(df, aes(x=x,_y=y)) +_geom_point() + 
  scale_y_continuous(limits =_c(