|
|
@@ -18,6 +18,7 @@ import com.bumptech.glide.Glide;
|
|
|
import com.bumptech.glide.load.DataSource;
|
|
|
import com.bumptech.glide.load.engine.GlideException;
|
|
|
import com.bumptech.glide.request.RequestListener;
|
|
|
+import com.bumptech.glide.request.RequestOptions;
|
|
|
import com.bumptech.glide.request.target.Target;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
@@ -172,22 +173,23 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
if (x > -maskWidth && x < screenWidth) { // holder 가 표시되는 부분에서만 계산
|
|
|
|
|
|
// modify itemView x -------------------------------------------------
|
|
|
- cx = x + (maskWidth >> 1);
|
|
|
- ratio = (float) -cx / (maskWidth >> 1);
|
|
|
-
|
|
|
- if (ratio > 1) {
|
|
|
- ratio = 1;
|
|
|
- }
|
|
|
- else if (ratio < 0) {
|
|
|
- ratio = 0;
|
|
|
- }
|
|
|
- tx = (int) -(spaceWidth * ratio);
|
|
|
-
|
|
|
- // 이미지와 dim 마스크 함께 이동.
|
|
|
- imageView.setX(tx);
|
|
|
- mask0.setX(tx);
|
|
|
- mask1.setX(tx);
|
|
|
- mask2.setX(tx);
|
|
|
+ tx = 0;
|
|
|
+// cx = x + (maskWidth >> 1);
|
|
|
+// ratio = (float) -cx / (maskWidth >> 1);
|
|
|
+//
|
|
|
+// if (ratio > 1) {
|
|
|
+// ratio = 1;
|
|
|
+// }
|
|
|
+// else if (ratio < 0) {
|
|
|
+// ratio = 0;
|
|
|
+// }
|
|
|
+// tx = (int) -(spaceWidth * ratio);
|
|
|
+//
|
|
|
+// // 이미지와 dim 마스크 함께 이동.
|
|
|
+// imageView.setX(tx);
|
|
|
+// mask0.setX(tx);
|
|
|
+// mask1.setX(tx);
|
|
|
+// mask2.setX(tx);
|
|
|
// modify itemView x -------------------------------------------------
|
|
|
|
|
|
// bitmap x -------------------------------------------------------
|
|
|
@@ -281,7 +283,7 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
this.textPositionMaxYOnMask = (((ViewGroup.MarginLayoutParams) textBig.getLayoutParams()).topMargin); //ResourceUtil.dpToPx(218); <- 레이아웃의 위치를 최대값으로 지정.
|
|
|
this.textPositionTargetYOnScreen = screenHeight - ResourceUtil.dpToPx(71);
|
|
|
|
|
|
- textBig.setText(bean.getTitle());
|
|
|
+ textBig.setText(bean.getTwoLineTitle());
|
|
|
textSmall.setText(bean.getSubtitleWithTrim());
|
|
|
|
|
|
maskWidth = ResourceUtil.getDimension(R.dimen.main_contents_image_width);
|
|
|
@@ -302,7 +304,7 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
.load(url)
|
|
|
// .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE))
|
|
|
// .apply(new RequestOptions().skipMemoryCache(true))
|
|
|
-// .apply(new RequestOptions().override(maskWidth, maskHeight))
|
|
|
+ .apply(new RequestOptions().override(maskWidth + 400, maskHeight + 100))
|
|
|
.listener(new RequestListener<Drawable>() {
|
|
|
@Override
|
|
|
public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
|