Android通知在下半部分显示为文本 [英] Android notification which shows as text in the lower half
本文介绍了Android通知在下半部分显示为文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想说的是,这个问题确实很糟糕,但是什么叫的通知仅在屏幕的下半部分显示灰色背景的快速文本信息?
this question is really dump I'd say but what are the notifications called that only show a quick text information in the lower half of the screen with a gray background?
例如,它们显示在标准Android警报应用程序中警报响起之前的剩余时间.我只是找不到他们,因为我不知道如何正确地描述它xD
They, for example, show the remaining time until the alarm will ring in the standard Android alarm application. I just wasn't able to find them because I have no idea how to describe it properly xD
希望你们知道我在说什么,谢谢
Hopefully, you guys know what I am talking about, thank you
推荐答案
假设您的意思是吐司消息.
Assuming you mean Clock, what you are looking at is a Toast message.
CharSequence text = "Hello toast!";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, text, duration);
toast.show();
这篇关于Android通知在下半部分显示为文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文