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 8422443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:26:50+00:00 2026-06-10T03:26:50+00:00

I’ve a custom ListView containing 4 TextViews. Now, the TextViews have to be Linkifiable.

  • 0

I’ve a custom ListView containing 4 TextViews. Now, the TextViews have to be Linkifiable. Since Linkify wasn’t working in ListView, I made a callIntent function to see if the link is clickable or not. But if there’s no clickable link, I want to start a new Activity. I use the following code:

           lvMembersList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
        public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {

          final TextView txtLine1 = (TextView) arg1.findViewById(R.id.tv_member_details_line1);
          final TextView txtLine2 = (TextView) arg1.findViewById(R.id.tv_member_details_line2);
          final TextView txtLine3 = (TextView) arg1.findViewById(R.id.tv_member_details_line3);
          final TextView txtLine4 = (TextView) arg1.findViewById(R.id.tv_member_details_line4);

         txtLine1.setOnClickListener(new OnClickListener() {
                              public void onClick(View v) {
                                     callIntent(1);
                              }
                       });

         txtLine2.setOnClickListener(new OnClickListener() {
                              public void onClick(View v) {
                                     callIntent(2);
                              }
                       });

         txtLine3.setOnClickListener(new OnClickListener() {
                              public void onClick(View v) {
                                     callIntent(3);
                              }
                       });

         txtLine4.setOnClickListener(new OnClickListener() {
                              public void onClick(View v) {
                                     callIntent(4);
                              }
                       });

}}

Now, when I click on an item for the first time, the TextView listeners are getting set. The individual clicks only works after the second time. What should I do in such a case?

  • 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-06-10T03:26:52+00:00Added an answer on June 10, 2026 at 3:26 am

    Put this code in the getView() method in the adapter. And in your code onItemClick is called when you click on a row of the listview.

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

Sidebar

Related Questions

I have a ListView with a custom Adapter that creates rows containing TextViews that
Here's my aproach: I have a custom ListView containing a custom Adapter containing two
I have a custom listview and made overlapping very simple: in onDraw method, I
I have a listView with custom rows containing buttons and I populate the listView
I have a custom ListView with two TextViews , I have two string arrays
So I have a custom ListView object. The list items have two textviews stacked
I have a custom listview row whose XML has one ImageView and three TextViews
I have a custom listview with two textviews . If I use the emulator
I have a Custom ListView containing events. The Adapters SectionIndexer indexes the day of
I have a Custom ListView with an imageview and 2 TextViews above each other

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.