|
|
@@ -270,10 +270,9 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
|
|
|
@Override
|
|
|
public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
|
|
|
- Drawable drawable = resource;
|
|
|
//you should call after the bitmap drawn
|
|
|
- imageWidth = drawable.getIntrinsicWidth(); //this is the bitmap's width
|
|
|
- imageHeight = drawable.getIntrinsicHeight(); //this is the bitmap's height
|
|
|
+ imageWidth = resource.getIntrinsicWidth(); //this is the bitmap's width
|
|
|
+ imageHeight = resource.getIntrinsicHeight(); //this is the bitmap's height
|
|
|
|
|
|
// Log.i("APP# MainCategoryContentsImageView | init", "| maskWidth: " + maskWidth + ", maskHeight: " + maskHeight);
|
|
|
// Log.i("APP# MainCategoryContentsImageView | init", "| imageWidth: " + imageWidth + ", imageHeight: " + imageHeight);
|
|
|
@@ -290,7 +289,7 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
}
|
|
|
|
|
|
private int getScreenY(View view) {
|
|
|
- int containerPos[] = new int[2];
|
|
|
+ int[] containerPos = new int[2];
|
|
|
view.getLocationOnScreen(containerPos);
|
|
|
|
|
|
return containerPos[1];
|
|
|
@@ -298,39 +297,8 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
|
|
|
@Override
|
|
|
public void dispose() {
|
|
|
-
|
|
|
+ // 이미지가 화면에서 사라진 뒤 변환 됨
|
|
|
+// Glide.with(imageView).clear(imageView);
|
|
|
}
|
|
|
|
|
|
-//
|
|
|
-// @GlideModule
|
|
|
-// public class GlideImageLoader extends AppGlideModule {
|
|
|
-//
|
|
|
-// public void load(ImageView imageView, String url) {
|
|
|
-//
|
|
|
-// Glide.with(imageView)
|
|
|
-// .load(url)
|
|
|
-// .listener(new RequestListener<Drawable>() {
|
|
|
-// @Override
|
|
|
-// public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
|
|
|
-// return true;
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
|
|
|
-// Drawable drawable = resource;
|
|
|
-// //you should call after the bitmap drawn
|
|
|
-// imageWidth = drawable.getIntrinsicWidth(); //this is the bitmap's width
|
|
|
-// imageHeight = drawable.getIntrinsicHeight(); //this is the bitmap's height
|
|
|
-//
|
|
|
-//// Log.i("APP# MainCategoryContentsImageView | init", "| maskWidth: " + maskWidth + ", maskHeight: " + maskHeight);
|
|
|
-//// Log.i("APP# MainCategoryContentsImageView | init", "| imageWidth: " + imageWidth + ", imageHeight: " + imageHeight);
|
|
|
-//
|
|
|
-// onScrolledInternal();
|
|
|
-//
|
|
|
-// return true;
|
|
|
-// }
|
|
|
-// })
|
|
|
-// .into(imageView);
|
|
|
-// }
|
|
|
-// }
|
|
|
}
|