【题外话】Android中弹出消息为什么叫Toast(吐司)?
据维基百科上的不可靠消息,谷歌的一位前微软员工在 MSN Messenger 的开发过程中创造了这个术语,因为 Messenger 的小通知窗口向上滑动进入视图,就像吐司从烤面包机中弹出。
An ex-Microsoft employee of Google is credited with coining the term during the development of MSN Messenger, since Messenger's small notification windows slide upward into view, like toast popping out of a toaster.
和其他控件稍有不同,Toast是用JAVA代码写得,不是在xml中添加的
一、学习准备
(以点击Button后弹出消息为例)
二、 Toast使用
停留时间长短就两种:
- 短:length_short
- 长:length_long