나는 안드로이드 카메라를 사용하여 사진을 찍고있는 안드로이드 앱을 가지고 있습니다. 이 사진은 activity A
에서 찍은 후 편집 된 activity B
에게 전송됩니다. 당신은 내가 회전하고있어 볼 수 있듯이 bitmap
내가이 사용하는 90받을이미지 크기를 안드로이드에서 전체 화면으로 설정
Bundle extras = getIntent().getExtras();
BitmapFactory.Options options=new BitmapFactory.Options();
options.inSampleSize = 5;
byte[] imageData = extras.getByteArray("imageData");
Bitmap myImage = BitmapFactory.decodeByteArray(imageData , 0, imageData.length,options);
Matrix mat=new Matrix();
mat.postRotate(90);
bitmapResult = Bitmap.createBitmap(myImage, 0, 0, myImage.getWidth(), myImage.getHeight(), mat, true);
ImageView imageView = (ImageView) findViewById(R.id.myPic);
imageView.setImageBitmap(bitmapResult);
:
이
은 어떻게activity B
내 이미지를받을 수 있습니다
Matrix mat=new Matrix();
mat.postRotate(90);
을 그리고 여기 내 imageView
입니다 in XML 파일 :
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:id="@+id/myPic"
/>
문제가 있습니다. 내가 직면하고있어 t는 당신이 여기에서 볼 수 있습니다 almoust 전체 screnn입니다하지만 entirly.As ... 내 사진을 전체 화면이되지 않는 것입니다 :
당신이 약간 증가하는 데 도움 수 있다면 그 크기 정말 고마워 할 것입니다. 감사합니다
편집 : 내 이미지의 너비를 높이고 싶습니다. 죄송합니다!
은 버튼 뒤의 이미지도 표시하려는 것을 의미합니다. – Hanry
이미지의 너비를 늘리고 싶습니다. – adrian
android : scaleType = "fitXY"를 imageView xml에 사용해 보셨습니까? – ingsaurabh