我在這個應用程序中實現益智遊戲應用程序創建一個按鈕,在點擊按鈕顯示原始圖像的拼圖。原始圖像顯示在對話框中,然後單擊確定返回實際的頁面怎麼能實現在對話框中設置視圖插入可繪製圖像如何在android中設置
bitmapOrg = BitmapFactory.decodeResource(getResources(),mThumbIds[GameActivity.level]);
請提出了一些解決方案的迫切這個問題懸而未決多天在此先感謝
我在這個應用程序中實現益智遊戲應用程序創建一個按鈕,在點擊按鈕顯示原始圖像的拼圖。原始圖像顯示在對話框中,然後單擊確定返回實際的頁面怎麼能實現在對話框中設置視圖插入可繪製圖像如何在android中設置
bitmapOrg = BitmapFactory.decodeResource(getResources(),mThumbIds[GameActivity.level]);
請提出了一些解決方案的迫切這個問題懸而未決多天在此先感謝
我認爲你需要設置對話框圖標。
如果是這樣,你可以通過以下
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("Message");
builder.setCancelable(false)
.setPositiveButton("Ok",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
}
});
AlertDialog alert = builder.create();
alert.setTitle("Title");
alert.setIcon(R.drawable.your_image);
alert.show();
做謝謝
如果你想設置圖像對話框,這是一個粗略的答案:
ImageView的形象=新ImageView的(本);
image.setLayoutParams(new LayoutParams(your width,height)); 。
或者通過使用可拉伸或通過設置位圖
新AlertDialog()生成器(本).setView(圖像).show()在此imageview的背景圖像;
這只是一個粗略的解決方案,但它會給你一個想法
非常感謝你對此解決方案的迴應 – Narasimha 2010-11-02 08:01:07
永遠歡迎...... :) – 2010-11-02 11:45:54