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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:56:36+00:00 2026-06-01T02:56:36+00:00

Android newb here. Please use small words :-) I’d like to simulate typewriter output

  • 0

Android newb here. Please use small words 🙂

I’d like to simulate typewriter output on my Android. The output being displayed is generated by a game and is somewhat freeform. The effect I want to see individual characters appear at a rate of about 6 characters a second. When a ‘carriage return’ is seen, I’d like to insert a delay then resume typing on the left.

What are some suggestions on views? Would the view of choice for this be a TextView? Even that seems like overkill for this read-only coarsely scrolling output.

I saw something on this thread about an AsyncTask. That looks useful. Perhaps my game will write to some manner of buffer, and a subclass of AsyncTask will pull a character out every .15 seconds or so, add it to the TextView, then invalidate() the TextView? Sound like a plan?

Resolution:

I wrapped the TextView in the ScrollView and it worked fine. The suggested ‘TextView.append()’ also did the job, as expected. I had trouble with the scroll.FullScroll(), however. Apparently this has to be executed using a Runnable from the scroll.post() method. I don’t know why, exactly, but I’ll dig into that later. There are a number of SO threads about it.

  • 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-01T02:56:38+00:00Added an answer on June 1, 2026 at 2:56 am

    Would the view of choice for this be a TextView?

    A TextView wrapped in a ScrollView seems likely:

      <ScrollView android:id="@+id/scroll"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
      >
        <TextView android:id="@+id/transcript"
          android:layout_width="match_parent" 
          android:layout_height="wrap_content" 
        />
      </ScrollView>
    

    Sound like a plan?

    You do not need an AsyncTask for this. Use postDelayed() on your TextView or something to schedule a Runnable to run in 166 milliseconds. That Runnable will:

    • Append your character to your TextView
    • Scroll the ScrollView to the bottom (in case you have exceeded what fits on the screen)
    • Schedules itself via postDelayed() to run in another 166 milliseconds

    The first two bullets would look like:

    transcript.append(yourCharacter);
    scroll.fullScroll(View.FOCUS_DOWN);
    

    Things will not be completely even, as that 166ms is a minimum time before the Runnable runs. OTOH, slightly irregular delivery of keys would accentuate the typewriter effect.

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

Sidebar

Related Questions

I'm a newb to Android, so please be patient. I'm trying to set up
Newb question. How can you know what the main launch Activity is? Learning Android.
I am completely new to android, and pretty much a Java newb. I have
Possible Duplicate: Property and Encapsulation NEWB Alert!! I am starting with Android and Java
I hate to sound like terrible newb, but are Widgets separate apps? For instance,
Android Application : Basically application has to register few credentials like username , password
(Android 3.0+) How would I create a Spinner for use as an Action Item
If you have any knowledge of ListViews/RSS feeds/Android programming in general, please take a
Android allows content of a URL to be displayed within an application using WebView
Android provides various packages for testing like AndroidTestCase ApplicationTestCase InstrumentationTestCase ActivityInstrumentationTestCase2 ActivityTestCase I need

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.