java - Android, How can I get text from TextView in OnClick -
i have textview , each have onclicklistener. information in method textview
textview tv2 = new textview(this,(string)book.get(i),this); tv2.setonclicklistener(new onclicklistener() { public void onclick(view v) { intent intent = new intent(contact.this,discution.class); //string str = this.gettext(); //like startactivity(intent); } }); how can : this.gettext(); in onclicklistener ?
tv2.setonclicklistener(new onclicklistener() { public void onclick(view v) { intent intent = new intent(contact.this,discution.class); string str = tv2.gettext().tostring(); startactivity(intent); }
Comments
Post a Comment