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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:28:49+00:00 2026-06-11T18:28:49+00:00

I want to display text (relatively large) and determine which character the user touches.

  • 0

I want to display text (relatively large) and determine which character the user touches. I’d also like to embellish the text by drawing a circle (for example) over certain characters. How do I know which characters are at what location? Enforcing monospaced font would be fine if helpful programmatically.

Would it also be able to make this one line of text scroll left/right (using touch->slide) and still have touch work to determine the correct character?

  • 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-11T18:28:50+00:00Added an answer on June 11, 2026 at 6:28 pm

    A very broad question, and you’ve got a lot of work ahead, but here’s the outline of one possible solution:

    • Create a custom view. ImageView is often a good base class to
      inherit.

      Override the onDraw() method of the view.

      Use canvas.drawText() to place your text on screen.

      Use paint.getTextBounds to meausure your text. See the discussion
      linked below for a thorough understanding. Since you drew the text
      on screen, and you measured it, you know exactly where each
      character is.

      Override the onTouch() method in your custom view and track the
      events you need. There are many QAs here in SO on how to do this.

      For scrolling the text, use canvas.translate() using the movement
      you calculate in the onTouch(). Since you know how much you
      scrolled (translated), you know how far your characters have moved
      and can offset your touch detection to detect character touches.

      Finally, since you now control all of the drawing and, your
      character positions are abstract, only having meaning when compared
      to a touch position, you can embellish them in any way choose.

    Android Paint: .measureText() vs .getTextBounds()

    Phew!

    Good luck.

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

Sidebar

Related Questions

In my XAML file I want to display this text which contains double and
I want to display a very large text file but want to break it
I have the password field on page. I want to display text Enter password
I want to display some text on twitter/facebook when a link is clicked on
I want to display some text for a few seconds and then quit my
In my code,I want to display TextView text name as Toast message. I do
I am new to web programming,learning VBScript.I want to display few text boxes in
I'm making a game and in the menu I want to display the text
I want to display the following text in my program.When ever I paste the
I want to display svn revision number to a text file I am getting

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.