Android toast 有奇怪的形状

标签 android toast

在我的应用程序中使用 toast 消息时,它显示为错误的形状。我使用的代码是:

Toast.makeText(context, context.getResources().getString(R.string.changeLanguageConf), Toast.LENGTH_SHORT).show();

Toast wrong shape

您知道根本原因是什么吗? context 是从不同过程作为 getContext() 传递的参数。

最佳答案

这是由于使用的主题。更具体地说,这是由于:

<item name="android:fitsSystemWindows">true</item>

感谢帮助

关于Android toast 有奇怪的形状,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39601926/

相关文章:

android - 如何在 Android 中提高 Camera 2 的图像质量?

android - 本地缓存图像,来自 google firebase 存储

android - 为什么在使用 HttpClient 时服务器响应中省略了 Content-Length header ?

android - ListView 非常不稳定 - 可能有问题的布局

flutter - 如何解决 Flutter 中的 "No implementation found for method showToast"?

JavaFX:未装饰的窗口

android - 我可以使用一个工厂将 View 模型/存储库调用与 kodein 绑定(bind)吗

android - 数据库行 ID 错误

Linux:设置自定义警报/ toast /不确定名称

java - 尝试创建 Toast.makeText 时出错