android - Google Photos image cropping tool -


how create image cropping tool google photos application image cropping tool? have searched everywhere, didn't found library or code works google photos cropping app.

i mean, functionality of app. have found many libraries, problem that, when add seekbar image rotating, rotating hole view (image , cropping frame), want, cropping frame don't rotate.

i tried libraries https://android-arsenal.com/tag/45

enter image description here

here rotating code, , library https://github.com/jdamcd/android-crop

private void rotateclick(){     seekbar.setonseekbarchangelistener(new seekbar.onseekbarchangelistener() {         @override         public void onprogresschanged(seekbar seekbar, int progress, boolean fromuser) {             imageview.setrotation(progress)         }          @override         public void onstarttrackingtouch(seekbar seekbar) {          }          @override         public void onstoptrackingtouch(seekbar seekbar) {          }     }); } 

and xml

 <seekbar     android:id="@+id/seekbar"     android:layout_width="match_parent"     android:layout_height="wrap_content" />  <com.soundcloud.android.crop.cropimageview     android:layout_margintop="20dp"     android:id="@+id/crop_image"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:scaletype="center"     android:adjustviewbounds="true"     android:layout_below="@id/done_cancel_bar" /> 

you can use method crop image. hopes you.

 public static void copyfile(file src, file dst) {     try {         dst.createnewfile();         fileinputstream instream = new fileinputstream(src);         fileoutputstream outstream = new fileoutputstream(dst);         filechannel inchannel = instream.getchannel();         filechannel outchannel = outstream.getchannel();         inchannel.transferto(0, inchannel.size(), outchannel);         instream.close();         outstream.close();     }catch (ioexception e) {         log.e("copy", "failed copy");     } } 

Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -