简体   繁体   中英

Click on the List view Item

I am new to android , I have list view in which i have One Image view and three Text view . All i want to perform Click event on text view only. I tried using "OnItemClicklistener" of list-view , but at first click of list , whole row get click-able, which i don't need it . i want to click Text view on very first click of the List . I did listing from this link example " http://wptrafficanalyzer.in/blog/listview-with-images-and-text-using-simple-adapter-in-android/ ".

Any kind of help is appreciated . Thank you in advance.

简单使用lazyadapter类并在其上添加onclick事件

Instead of SimpleArrayAdapter use custom adapter. Check this link

Check example of point 2. Adapter implementations

And inside the adapter implement your textView.setOnClickListener(..)

您应该为您的Textview创建onclicklistener,以在自定义适配器类中为其单击事件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM