Previous write about calling system camera and cropping, this piece of writing about calling system albums cropping photos
Btn_album.setonclicklistener (New Onclicklistener () {
@Override
public void OnClick (View v) {
Intent Intent;
Logotemppath = Logo_base_path + system.currenttimemillis () + ". png";
Intent = new Intent (Intent.action_pick, NULL);
Intent.settype ("image/*");
Startactivityforresult (Intent, photo_album);
}
});
The above is to click on a button to call the system camera, temporary file name definition reason is the same as before the camera call
-------------------------------------------------------------------------------------
if (Requestcode = = Photo_album) {//from album
if (data = = NULL | | data.getdata () = = null)
Toast.maketext (Getapplicationcontext (), "Get failed from album", Toast.length_short). Show ();
Else
Startphotozoom (Data.getdata ());
}
The above is the Onactivityresult method to return data when the operation, some phone return data may be empty, it is necessary to add a judgment
Startphotozoom (Data.getdata ()); The method is the same as the method in the previous article.
----------------------------------------------------------------------------------
When you call a photo album you don't have so many problems as when you call the camera, here's so much, what's the problem you can come up with to discuss research ^_^
Android calls system albums and crops