if i use
<com.lyft.android.scissors.CropView
android:id="@+id/clipfilter_img"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cropviewViewportOverlayColor="#a0000000"
/>
at layout XML ,the picture display like fit end on bottom cropline(picture bottom coincidence with app:cropviewViewportRatio line),not the bottom your CropView。
and i use cropview.setViewportRatio(1f) aslo has this questiong.
i find that if the picture not load done then use cropview.setViewportRatio(1) will has this question。
so i ues the
Glide.with(this).load(imgPath).listener(new RequestListener<String, GlideDrawable>() {
@Override
public boolean onException(Exception e, String model, Target target, boolean isFirstResource) {
return false;
}
it can solve thisquestion。
but i find another question ,the android:scaleType="" not work。the pic always fill the corpview like i use the fitXY,even a square picture aslo stretch to fill parent。
Now i use
@Override
protected void onResume() {
super.onResume();
handler.postDelayed(new Runnable() {
@Override
public void run() {
imageView.setViewportRatio(1f);
}
}, 300);
}
,but if the pic is too big or my phone not have a stronger CPU,cropView load pic 0.3S not done aslo has the fist question 。but the time aslo can't set too long which cause i can saw the setViewportRatio anim 。
Thanks for you share the Demo。
if i use <com.lyft.android.scissors.CropView android:id="@+id/clipfilter_img" android:layout_width="match_parent" android:layout_height="match_parent" app:cropviewViewportOverlayColor="#a0000000" /> at layout XML ,the picture display like fit end on bottom cropline(picture bottom coincidence with app:cropviewViewportRatio line),not the bottom your CropView。 and i use cropview.setViewportRatio(1f) aslo has this questiong.
i find that if the picture not load done then use cropview.setViewportRatio(1) will has this question。 so i ues the Glide.with(this).load(imgPath).listener(new RequestListener<String, GlideDrawable>() { @Override public boolean onException(Exception e, String model, Target target, boolean isFirstResource) {
return false;
}
it can solve thisquestion。 but i find another question ,the android:scaleType="" not work。the pic always fill the corpview like i use the fitXY,even a square picture aslo stretch to fill parent。
Now i use @Override protected void onResume() { super.onResume(); handler.postDelayed(new Runnable() { @Override public void run() { imageView.setViewportRatio(1f); } }, 300); } ,but if the pic is too big or my phone not have a stronger CPU,cropView load pic 0.3S not done aslo has the fist question 。but the time aslo can't set too long which cause i can saw the setViewportRatio anim 。
Thank you。