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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:05:16+00:00 2026-06-07T22:05:16+00:00

When I searched about toast in stackoverflow I have found many things which were

  • 0

When I searched about toast in stackoverflow I have found many things which were related to my problem.However none of them solved my problem. In my android app I am supposed to show many toasts after eachother.However when I try to do so, next toast waits for the current toast to finish. Even if I used cancel for toast , it seems to me it never works.Please offer me a exact solution.Thank you..

inflater = getLayoutInflater();
    backgForToast=(ViewGroup) findViewById(R.id.toast_layout_root);
    layout = inflater.inflate(R.layout.toastbackground,backgForToast);
    textForToast = (TextView) layout.findViewById(R.id.text);

    textForToast.setText(toastMessage);
    toast.setGravity(Gravity.TOP|Gravity.LEFT, toastX2-90,toastY2-90);
    toast.setView(layout);
    toast.show();

    Handler handler = new Handler();
    long delay = 500;

    handler.postDelayed(new Runnable() {
        @Override
        public void run() {
            toast.cancel();
        }
    }, delay);
  • 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-07T22:05:17+00:00Added an answer on June 7, 2026 at 10:05 pm

    You need to create a Toast object with Toast.makeText before you can cancel() it.

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

Sidebar

Related Questions

Searched a lot about this problem but never found a answer, that solved it.
I have searched for a CGI and read about it but nothing useful found.
I've searched and I found some things about compiling to JARs in Eclipse, but
I have searched about all the post but I can't found the solution on
I really searched about 50 related pages but never seen a problem similar to
Firstly I ve searched about usage of Generic Types in java, however answers I
I have searched a lot about the difference between Website and WebApplication but didn't
I have searched on google about how to get started with the dependency property
So I have searched for this but not finding anything about it and if
I just searched about gzip and Deflate , and found out that Deflate is

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.