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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:02:39+00:00 2026-05-26T12:02:39+00:00

This is propably just idea issue. I have many textViews in one ScrollLayout (so

  • 0

This is propably just idea issue.
I have many textViews in one ScrollLayout (so let’s say only half of them are showed at one moment on screen). Then I have an editText and I am thinking of a way how to highlight & scroll to the textView which contains same string value as user wrote in editText.
For instance :

editText.text = "Test"
textView.text = "Testing Issue"
textView2.text = "Bla Bla"

I want to highlight the part/full(doesnt matter) textView with the corresponding text value.

Many thanks in advance and sorry if my question is lame 🙂 as I am new to Android.

  • 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-26T12:02:39+00:00Added an answer on May 26, 2026 at 12:02 pm

    In this case I’d recommend using a ListView, and have a separate row for evey text segment you have.

    You assign a TextWatcher for the EditText, it has a callback that gets called after every letter typed in. In this callback, you do you search for the entered string (possibly asynchronously), and get back the positions of the rows that contain the specified substring.

    Now to scroll the ListView to the first occurence, you can use its .smoothScrollToPosition() method.

    As for the highlights, you probably view the texts in the rows using TextView widgets. You can set the text viewed inside these with .setText(), which accepts Spannable/Spanned objects as well. These are strings on steroids, you can assign style spans on different regions of the strings. So you can use this to e.g. show the substring you’ve found in a different colour/background/etc.

    Or use html. Html.fromHtml() actually processes the html tags in the provided strings into a Spannable objects, so it may be easier to work with 🙂

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

Sidebar

Related Questions

This probably sounds really stupid but I have noo idea how to implement jquery's
Hey, so basically I have this issue, where I'm trying to put an equation
This questions doesn't let me sleep as it's since one year I'm trying to
This is probably just wishful thinking... Is there any way to check to see
I probably just haven't thought this through, or perhaps I'm simply unaware of an
This is probably a pretty basic question, but just something that I wanted to
This is probably quite simple, but I just don't know how to do this...
This is probably a no brainer but... I've just opened a solution in VS2008
This is probably going to be a really simple fix... I just can't figure
I know this question is probably stoopid. But I just don't want to cause

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.