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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:25:47+00:00 2026-05-28T19:25:47+00:00

I had already setup the buttons and the layout properly, but I’m having an

  • 0

I had already setup the buttons and the layout properly, but I’m having an issue to dynamically change the text in the buttons

|B|P|M|F|

When the letter b is clicked: change b to e, f, g and each change of letter stops for 1 second
When the letter p is clicked: change p to q, r, s and each change of letter stops for 2 second
and so on.

I searched Google, and many results show that I need some sort of threading to accomplish it. Can anyone point me to the right direction?

Thanks

Sorry if I wasn’t clear enough. My exact problem is to change the text when the user has touched on a button 4 times that pauses each changed text for 1 to 2 seconds not exactly. This is part of the source code

public class someClass extends Activity implements OnClickListener
{
    //Single Vowels
    Button a_button;
    MediaPlayer mp = new MediaPlayer();
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);  

        MediaPlayer.OnCompletionListener completionListener = new MediaPlayer.OnCompletionListener()
        {
            public void onCompletion(MediaPlayer mediaP) 
            {
                mediaP.stop();
                mediaP.release();
            }
        };

        mp.setOnCompletionListener(completionListener);

        a_button = (Button)findViewById(R.id.a_button);
        a_button.setOnClickListener(this);
    }

    public void onClick(View v) 
    {
        switch(v.getId())
        {
              case R.id.a_button:
              mp = MediaPlayer.create(this, R.raw.a_multiple);
              mp.start();   
              break;
        }
    }
}

So what I want to do is when the user pressed the button, there would be some sort of speech, for example, this is an apple, and the text will change accordingly with the speech. The speech is pre-recorded, and all I have to do is to trial and error and match the speech with the changing words. In total I have about 10+ buttons that does the same thing.

  • 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-28T19:25:48+00:00Added an answer on May 28, 2026 at 7:25 pm

    What exacly is your problem? Change the text? Make one or two seconds pause?

    Have you got some source code?

    To create a “Make … in … seconds” you can make:

    Handler handler = new Handler();
    
    // Then call (in a Thread):
    
    handler.postDelayed(new Runnable()
    {
        public void run()
        {
            label1.setText("b");
        }
    }, 1000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Glassfish had already been installed into Netbeans. But I forgot the password and username.
i already had 2008 express sql server but for some reason it came without
We've had this question already, but I want to narrow it down to already
i registered my app and i got client_id,secret_id,etc.. ( http://developers.facebook.com/setup/ ) i had already
I am trying to write a program in PHP which I had already written
Need some help with this problem in implementing with XSLT, I had already implemented
I've read somewhere that the trunk version of Firefox already had a WebSocket implementation.
I added a FULLTEXT index on three of my columns, after I already had
OS X 10.5.8 came with Python 2.5, and had PyObjC already installed. I installed
A buddy sent me a later version of an .apk file. I already had

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.