I am populating a TableLayout (i.e. rows and columns) with data (strings).
When I click on a cell, I would like the data stored in this cell to be displayed in my console.
How can I do that? Is there any other way than to go over IDs?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As stated in http://developer.android.com/resources/tutorials/views/hello-tablelayout.html , there is no Column or TD (Table Data) or Cell equivalent in android. Each element is treated as an individual cell unless otherwise noted.
Having this in mine, and given the fact that you don’t specify what kind of View you’re using inside your rows, may I guess it’s a Button which you can of course click with something like this:
Hope this helps.