任何人都可以讓我知道這是什麼窗口小部件?請參閱附件中的相關小部件。無法識別小部件?
當我點擊收到的消息時,它從消息應用程序啓動。
它將文本顯示爲應用程序名稱。我已經搜索了「消息傳遞」一詞,但沒有任何效果。
謝謝,
任何人都可以讓我知道這是什麼窗口小部件?請參閱附件中的相關小部件。無法識別小部件?
當我點擊收到的消息時,它從消息應用程序啓動。
它將文本顯示爲應用程序名稱。我已經搜索了「消息傳遞」一詞,但沒有任何效果。
謝謝,
這不是Toast
消息;這是一個AlertDialog
public class yourActivity extends Activity {
public final static int DIALOG_ERROR = 1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
showDialog(DIALOG_ERROR); //this will call: onCreateDialog()
}
protected Dialog onCreateDialog(int id) {
Dialog dialog;
switch(id) {
case DIALOG_ERROR:
//create dialog
dialog = new AlertDialog.Builder(this).setMessage("Messaging").create();
break;
default:
//create a default dialog
dialog = null;
}
return dialog;
}
}
這是一個Toast
消息與自定義View
。 This tutorial可以幫助你創建你自己的。
更多關於自定義敬酒的對象,檢查出this other tutorial。
showDialog()從sdk 13開始已棄用 – auval