简体   繁体   中英

How can i get element number from the TableLayout while clicking on item from the TableLayout

单击“表格布局”中的项目时,如何从“表格布局”中获取元素编号?

You have to set a onclickListener to your row.

In order to identify wich cell was clicked you could tag the view of each cell using view.setTag(uniqueID) when you create it.

In your onClickListener function use view.getTag() to get the identity of your cell.

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