开发者

can not identified widget?

Ca开发者_如何学Cn anyone please let me know what widget is this? Please refer to the attachment for the widget in question.

It is launched from the messaging app, when I click on a received message.

It shows the text as the application name. I have searched for the term 'Messaging', but to no effect.

Thanks,

can not identified widget?


This is not a Toast message; it is an 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;
    }

}


This is a Toast message with a custom View. This tutorial can help you create your own.

can not identified widget?

For more on customizing a Toast object, check out this other tutorial.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜