在android系统弹出消息 [英] popup message in android
问题描述
I M开发应用程序。
i m developing an application..
我想创建,而我们所做的,这将是稳定的弹出消息无法接近......
i want to create a popup message that will be stable while we don't close...
我想要一些教程,帮我做一个alertDialog框。
I want some tutorial that help me to do a alertDialog boxes.
先谢谢了。
推荐答案
我认为你正在寻找的对话框复选框,从而可以显示警告信息,确认信息等,给用户。
I think you are searching for the "Dialog" box thereby you can show Alert message, confirmation message, etc. to the user.
有关更多信息,请参阅本:<一href=\"http://developer.android.com/reference/android/app/Dialog.html\">http://developer.android.com/reference/android/app/Dialog.html
For more info, refer this: http://developer.android.com/reference/android/app/Dialog.html ,
下面的警告对话框一个很好的例子:<一href=\"http://www.androidpeople.com/android-alertdialog-example/\">http://www.androidpeople.com/android-alertdialog-example/
Here a good example on Alert Dialog box: http://www.androidpeople.com/android-alertdialog-example/ .
从您的评论code:
AlertDialog.Builder alt_bld = new AlertDialog.Builder(this).create();
alt_bld.setMessage("apprika target achieve...");
alt_bld.setCancelable(false);
alt_bld.setPositiveButton("yes", new OnClickListener() { public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub } });
alt_bld.setNegativeButton("No", new OnClickListener() { public void onClick(DialogInterface dialog, int which) { // TODO Auto-generated method stub dialog.cancel(); } });
alt_bld.show();
和用于显示的警报对话框Click事件,写了 alert.show();
code点击监听器里
And for showing up the Alert dialog box in the Click event, write the alert.show();
code inside the click listener.
这篇关于在android系统弹出消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!