消息模式Toast.makeText用法
Toast用于向用户显示一些帮助/提示。下面我做了5中效果,来说明Toast的强大,定义一个属于你自己的Toast。
1.默认效果
代码
Toast.makeText(getApplicationContext(), "默认Toast样式",
2.自定义显示位置效果
代码
toast = Toast.makeText(getApplicationContext(),
3.带图片效果
代码
toast = Toast.makeText(getApplicationContext(),
4.完全自定义效果
代码
LayoutInflater inflater = getLayoutInflater();
5.其他线程
new Thread(new Runnable() {
- (2011-06-15 14:31:45)
- (2011-06-14 10:06:37)
- (2011-06-10 09:40:41)
- (2011-06-09 17:07:01)
- (2011-06-09 13:52:59)
- (2011-06-08 17:25:38)
- (2011-05-27 14:34:37)
- (2011-05-27 11:50:35)
- (2011-05-26 17:15:31)
- (2011-05-26 15:01:53)