Android Toast: Is a class that primarily manages tips for messages

Source: Internet
Author: User
Toast: is a class that primarily manages tips for messages.
Maketext () is a toast method used to display information with three parameters, respectively.
The first parameter: this, which is the context parameter, refers to the current page display
The second argument: "String string" is what you want to display, or "Hello!" ”。 This is a random definition that shows what you want to show.
The third parameter: Toast.length_long, you are referring to the message, the time shown, this is slightly longer, corresponding to the other is toastlength_short, this time is short, about 2 seconds.
Show (), indicating that the toast message is displayed, when the program runs here, it will be displayed, if you do not call the show () method, the Toast object exists, but does not display, so do not forget.

Android Toast: Is a class that primarily manages tips for messages

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.