Android7.0中文文档(API)-- Toast

完整内容,请查看:http://www.zhdoc.net/android/reference/android/widget/Toast.html

Toast

public class Toast
extends Object

java.lang.Object
   ↳android.widget.Toast


A toast is a view containing a quick little message for the user. The toast class helps you create and show those.
Toast是一个视图,其中包含了显示给用户一条简短的消息。Toast类帮助你创建和显示这样的消息。

When the view is shown to the user, appears as a floating view over the application. It will never receive focus. The user will probably be in the middle of typing something else. The idea is to be as unobtrusive as possible, while still showing the user the information you want them to see. Two examples are the volume control, and the brief message saying that your settings have been saved.
当视图显示给用户时,通常显示为一个覆盖着应用程序上的浮动视图。它永远不会接收焦点。用户不会在其中输入什么。这样做的目的是尽可能地不引人注目,同时向用户显示你希望他们看到的信息。两个例子,一个是音量控制,另外一个是显示一条简短的消息,以提示你的设置已经保存。

The easiest way to use this class is to call one of the static methods that constructs everything you need and returns a new Toast object.

Developer Guides


使用这个类的最简单的方法是调用一个静态方法来构造你需要的所有东西,并返回一个新的Toast对象。

开发者指南

For information about creating Toast notifications, read the Toast Notifications developer guide.
关于创建Toast的更多信息,请参考Toast Notifications开发者指南。

摘要


常量

intLENGTH_LONG

Show the view or text notification for a long period of time.
显示长时间的视图或文本通知。

intLENGTH_SHORT

Show the view or text notification for a short period of time.
显示短时间的视图或文本通知。

Public构造方法

Toast(Context context)

Construct an empty Toast object.
创建一个空的Toast对象。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值