How do I fit an image to the screen captured from the camera? I currently have a preview that is a sort of thumbnail version of the image taken. I want to touch it and fit it to the whole screen. In the layout, I have the property:
android:onClick="previewPhoto"
But I don't know how to proceed. Here is what I think I should do, but wonder if there is a simpler way. If I go with starting a new activity, how should I finish the following code?
public void previewPhoto(View view){
Toast.makeText(this, "Photo touched!", Toast.LENGTH_SHORT).show();
mImageView.setScaleType(ScaleType.FIT_XY);
Intent fullScreenIntent = new Intent(view.getContext(),FullImageActivity.class);
fullScreenIntent.putExtra
//ProfilePageNormalUser.this.startActivity(fullScreenIntent);
}
Note that mImageView is an object that holds the photo captured. When I simply use setScaleType(ScaleType.FIT_XY);
it will fit the image to the tiny thumbnail view.