I had the similar issue and solved it with a work around. In your table row
add a TextView and makes its visibility GONE and set its text as 0,1,2,4...
for respective rows. Add a single listener for each row. When some row is
clicked the listener will give you a clicked view. From this view get the
text view from this text view the index.





--
Best Regards,
Atif Gulzar

I ◘◘◘◘ Unicode, ɹɐzlnƃ ɟıʇɐ



On Sat, Jan 23, 2010 at 5:19 AM, Thierry Legras <[email protected]> wrote:

> Hi,
>
> ContextMenu seems quite handy as long as we are using an AdapterView as we
> can easily get selected item position in onContextItemSelected from
> AdapterContextMenuInfo.position
>
> Any idea how we can achieve something similar in a TableLayout?
> In my TableLayout, i have some TableRow and i would like to get the row
> index in the onContextItemSelected callback like i would do with a simple
> ListView.
>
> I guess i will have to register the contextmenu for each row? but how can
> tie the row index with the menu? i see no way to do it with
> registerForContextMenu.
>
> Thks,
> Thierry.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to