如何在 Dialog 的前台显示自己的 Toast?

How can I show my own Toast in the foreground of a Dialog?

我使用以下代码启动自己的 Toast:

TextView txtViewToast = (TextView)findViewById(R.id.txtViewToast); txtViewToast.setText(R.string.free_slots); Toast();

这段代码工作正常。它向我展示了吐司,但在后台。我想在对话框的前台显示这段代码。

final Dialog dialogPopupGewonnen = new Dialog(Start.this, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
    dialogPopupGewonnen.setContentView(R.layout.popupgewonnen);
dialogPopupGewonnen.show();

你必须在 Dialog 本身中调用 Toast,这样它就在它前面,而不是被它覆盖