作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
有没有什么简单的方法可以设置
而不用自定义它?Toast
的宽度
谢谢,硝酸酒精
更新:
没有这样的方法...我终于以这种方式定制了它......
http://developer.android.com/guide/topics/ui/notifiers/toasts.html
最佳答案
使用
Toast t = Toast.makeText(this, "Hello", Toast.LENGTH_SHORT);
t.setGravity(Gravity.FILL_HORIZONTAL, 0, 0);
关于android - 如何在 Android 中设置 toast 的宽度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6355995/
我是一名优秀的程序员,十分优秀!