Android的:如何设置敬酒的文本的颜色 [英] Android: How to set the colour of a Toast's text
问题描述
我显示敬酒消息if语句使用下面的code的结果是:
I am displaying a toast message as the result of an if statement using the following code:
Toast.makeText(getBaseContext(),请输入价格,Toast.LENGTH_SHORT).show();
Toast.makeText(getBaseContext(), "Please Enter Price", Toast.LENGTH_SHORT).show();
有被显示为白色文字,白色背景,因此它不能被读!我的问题是,我怎么可以改变面包的文本的颜色?
It is displayed as white text on a white background, as such it can not be read! My question is, how can I change the colour of the toast's text?
推荐答案
您可以创建自定义吐司,以满足您的要求。见标题为创建自定义吐司视图在<一个href="http://developer.android.com/guide/topics/ui/notifiers/toasts.html">http://developer.android.com/guide/topics/ui/notifiers/toasts.html
You can create a custom Toast view to suit your requirements. See the section titled "Creating a Custom Toast View" at http://developer.android.com/guide/topics/ui/notifiers/toasts.html
这篇关于Android的:如何设置敬酒的文本的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!