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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:47:59+00:00 2026-05-26T23:47:59+00:00

I have a listView, and ech item of listView has textView. I have set

  • 0

I have a listView, and ech item of listView has textView. I have set android:autoLink=”web|email” to textView and onTouch listener across each item of listView.When I touch the textView, onTouch is not called.

What I want is that when link is present in a textView, only that link must be clickable.The rest of textView i want to get in that onTouch.And if link not present ,I want to get onTouch across entire entire listView item. Is there any way?..Pls help.

  • 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-26T23:48:00+00:00Added an answer on May 26, 2026 at 11:48 pm
    String styledText = getResources().getString(R.string.Email);
        SpannableString span = new SpannableString(styledText);
    
        span.setSpan(new StyleSpan(Typeface.ITALIC),
                styledText.indexOf("Terms"), styledText.length(), 0);
        span.setSpan(new UnderlineSpan(), styledText.indexOf("Terms"),
                styledText.length(), 0);
    
        ClickableSpan clickSpan = new ClickableSpan() {
    
            @Override
            public void onClick(View widget) {
                // TODO Auto-generated method stub
                showInfoDialog();
            }
        };
        span.setSpan(clickSpan, styledText.indexOf("Terms"),
                styledText.length(), 0);
        span.setSpan(
                new ForegroundColorSpan(getResources().getColor(R.color.link_)),
                styledText.indexOf("Terms"), styledText.length(), 0);
        txt_accept.setText(span, BufferType.SPANNABLE);
    

    Use this code as a reference and use ur logic..can’t explain you the whole process..Comment if you need any help.

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

Sidebar

Related Questions

I have a ListView and each item have a TextView. I would like add
I have a ListView where each item has a checkbox. Initially there are no
I have listview with combox=true containg images. Each item is assigned a tag. I
I have listview which has 5000 items. I want to get item of listview
I have a ListView binded to a GenericList and for each Item it is
I have a listview and each item of the lisview is a linearlayout .
I have ListView which as one TextView in each Row. and im discovering some
I have listview item like below <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent android:layout_height=60dp android:orientation=horizontal android:descendantFocusability=blocksDescendants > <TextView
I have ListView. Every row has TextView with some text. And also by default
I have ListView with custom adapter extends ArrayAdapter. Each item is object: public class

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.