Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4040974
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:49:17+00:00 2026-05-20T12:49:17+00:00

In android, through xml parsing i have xml file values in tableview now which

  • 0

In android, through xml parsing i have xml file values in tableview now which are stored in an array.
Now my question is i want to apply textclick on that values.
For example: if values are

Lotus
Lily
Rose
Jasmine

and i want to click on Rose
then how can i take particular array value from the table and apply intent on it???

the for loop that i have applied in parsing from where im getting array values:

for (int i = 0; i < data.getName().size(); i++) {

         TableRow tr = new TableRow(this);
         //tr.setId(100+i);
         tr.setLayoutParams(new LayoutParams(
                 LayoutParams.FILL_PARENT,
                 LayoutParams.WRAP_CONTENT)); 

         // Create a TextView to house the name of the province
         name[i]= new TextView(this);
         name[i].setId(200+i);
         name[i].setText(data.getName().get(i));
         name[i].setTextColor(Color.WHITE);
         name[i].setLayoutParams(new LayoutParams(
                 LayoutParams.FILL_PARENT,
                 LayoutParams.WRAP_CONTENT));
         tr.addView(name[i]);

         value[i] = new TextView(this);
         value[i].setId(i);
         value[i].setText(data.getValue().get(i));
         value[i].setTextColor(Color.WHITE);
         value[i].setLayoutParams(new LayoutParams(
                 LayoutParams.FILL_PARENT,
                 LayoutParams.WRAP_CONTENT));
         tr.addView(value[i]);


        t1.addView(tr, new TableLayout.LayoutParams(
                 LayoutParams.FILL_PARENT,
                 LayoutParams.WRAP_CONTENT));
     }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:49:18+00:00Added an answer on May 20, 2026 at 12:49 pm

    Well, if it’s TableView, than it has some rows in it. Depending on implementation, you may wrap your textView into, for instance, linear layout and add click listener to it. For more information please be more specific regarding the issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am parsing an XML file through Android Pull Parser technique. First, have a
Here is my code: (source: http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/ ) Here is my XML file: removed On
I want authenticate user in my android app through google login and then dispaly
I want to display html in android activity through web view,my screen will be
I'm working through some android tutorials right now in preparation for a two week
I am parsing data through the web service. I want the flipping horizontally rather
what are the best practices parsing XML from an HTTP resource in Android? I've
I'm starting an Android app which will have multiple Activities. It will be using
I have gone through every tutorial to display an image on an android phone
I followed a tutorial located here: http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/ and so far everything worked fine with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.