在活动android app之间移动图像强制关闭错误对话框

时间:2012-04-11 18:53:48

标签: java android xml imageview android-imageview

任何人都可以告诉我为什么当我将图像路径(作为字符串)从一个活动移动到另一个活动时+在ImageView中显示它:它给了我(强制关闭错误)?

注意:只有在图片尺寸较大的情况下才会发生,所以:当我尝试使用小尺寸图片时,会移动它并正确显示! ......

任何建议!!

非常感谢, 萨米亚

================================更新============== =========================

 // For Uploading Picture
        public void onActivityResult(int requestCode, int resultCode, Intent data) {
            if (resultCode == RESULT_OK) {
                if (requestCode == SELECT_PICTURE) {
                    Uri selectedImageUri = data.getData();
                    case1.setPic(selectedImageUri.toString());
                    CasePicImgView.setImageURI(selectedImageUri);
                    if (selectedImageUri == null)
                        PicCheck = false;
                    else
                        PicCheck = true;
                }
            }
        }

    // inside onCreate()


    Nextb.setOnClickListener(new View.OnClickListener() {

                public void onClick(View v) {
                    case1.toString();
//CasePic = case1.getCasePic();
                                Bundle basket = new Bundle();
                                basket.putString("key", CasePic);
                                Intent k = new Intent(CreateNewForm.this,
                                        CreateNewForm_2.class);
                                k.putExtras(basket);
                                startActivity(k);

            });

// inside Activity2

// Receiving Case pic From CreateNewForm_2
        Bundle strPic = getIntent().getExtras();
        strPic= gotData.getString("key");
        CasePic.setImageURI(Uri.parse(strPic));

=================================结束============= =======================

================================ logcat的============== ==========

04-12 04:11:19.804: D/ViewFlipper(102): updateRunning() mVisible=false, mStarted=false, mUserPresent=true, mRunning=false
04-12 04:16:46.556: E/AndroidRuntime(517): ERROR: thread attach failed
04-12 04:43:02.264: E/AndroidRuntime(547): ERROR: thread attach failed
04-12 04:43:05.204: E/AndroidRuntime(559): ERROR: thread attach failed
04-12 04:44:41.965: E/AndroidRuntime(589): ERROR: thread attach failed
04-12 05:37:54.275: E/AndroidRuntime(605): ERROR: thread attach failed
04-12 05:37:57.256: E/AndroidRuntime(616): ERROR: thread attach failed

=============================================== ========================

0 个答案:

没有答案