응용 프로그램 갤러리에서 이미지를 업로드 할 때 이미지를 일부 선택했을 때 예외가 발생했습니다.galleryActivity에서 이미지를로드하는 중 원래 여기에 추가 된 창이 누출 되었습니까?
android.view.WindowLeaked: Activity has leaked window [email protected] that was originally added here
android.view.WindowManagerImpl.addView(Win
dowManagerImpl.java:152) 는 I didn 히, 나는 무작위로 예외를 가지고 왜 t에 ?? 코드 아래
이 코드가 열려 갤러리입니다 ..
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
((Activity) context).startActivityForResult(Intent.createChooser(intent,"Select Picture"), PICK_FROM_FILE);
내가
f (resultCode == RESULT_OK)
{
Uri contentUri = data.getData();
System.out.println("**************contentUri***************"+contentUri);
String[] proj = { MediaStore.Images.Media.DATA };
Cursor cursor = managedQuery(contentUri, proj, null, null, null);
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst();
String tmppath = cursor.getString(column_index);
// File abc= new File(tmppath);
System.out.println("**************tmppath***************"+tmppath);
Bitmap mBitmap = BitmapFactory.decodeFile(tmppath);
// Bitmap bitmap = BitmapFactory.decodeFile(abc);
System.out.println("**************mBitmap(gallery)***************"+mBitmap);
Court_formations objectdat =new Court_formations();
objectdat.showGalleryimage(getDialogContext(),mBitmap);
PLZ이 코드를 사용해보십시오으로 onActivity 결과에
코드 붙여 넣기 –
horizonall 모드에서 갤러리를 열면 potrait 모드로 고정 된 상태로 응용 프로그램으로 돌아올 때이 예외가 발생했습니다 – user1287756
그냥 galery에서 이미지를 가져 와서 imageview에 표시하고 있습니까? –