【发布时间】:2021-09-26 22:26:59
【问题描述】:
如何将 Android Toast 居中对齐
我在 StackOverflow 和 All over the Internet 中看到了许多相关问题,但它们将 toast 与显示对齐。但是,我想以我的 toast 为中心显示文本!
我的代码来显示我的 Toast
timeout_on = Toast.makeText(getBaseContext(), "Screen Timeout is Enabled (Your screen will doesn't sleep from now!)", Toast.LENGTH_SHORT);
timeout_on.show();
【问题讨论】:
-
您要居中吐司还是吐司的文本?
-
这能回答你的问题吗? Center text in a toast in Android
-
@Programmerabc 我想让 Toast 的文本居中!
-
可以,有人请为我的问题开始赏金吗?
标签: android toast text-alignment android-toast