BlackBerry对话框

时间:2010-11-16 19:27:20

标签: java blackberry

我有一些Android代码,我正在使用Dialog类来显示

public void createCustomDialog(String msg)
{
   Dialog dialog = new Dialog(this);
   dialog.setContentView(R.layout.custom_dialog);
   dialog.setTitle("Error");
   dialog.setCancelable(true);
   TextView text = (TextView) dialog.findViewById(R.id.text);
   text.setText(msg);
   ImageView img = (ImageView) dialog.findViewById(R.id.image);
   img.setImageResource(android.R.drawable.ic_dialog_alert);
   dialog.show();
 }

任何人都可以帮助我使用相应的Blackberry代码吗

2 个答案:

答案 0 :(得分:1)

您可以使用BlackBerry Dialog课程执行此操作。

答案 1 :(得分:0)

你会用这个:

Dialog.alert(String message);

如下:

Dialog.alert.("This is a Dialog!");

输出(在对话框中):

This is a Dialog!

添加图片请参阅: http://www.javaquery.com/2011/07/how-to-put-image-in-dialog-box.html

相关问题