有人能让我知道这是什么小工具吗?请参阅有问题的小部件的附件。
当我点击收到的消息时,它会从消息传递应用程序中启动。
它将文本显示为应用程序名称。我已经搜索了“消息传递”这个词,但是没有结果。
谢谢,
发布于 2011-08-13 12:28:33
这不是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;
}
}
发布于 2011-08-12 23:53:39
https://stackoverflow.com/questions/6757103
复制相似问题