|
|
@@ -9,6 +9,7 @@ import android.graphics.drawable.Drawable;
|
|
|
import android.support.annotation.Nullable;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.view.View;
|
|
|
+import android.view.ViewGroup;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
@@ -80,7 +81,7 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
float ratio;
|
|
|
|
|
|
// text
|
|
|
- if (null != textBig) {
|
|
|
+ /*if (null != textBig) {
|
|
|
cy = getScreenY(textBig);
|
|
|
|
|
|
// 적당한 위치에 있을 때만 처리한다.
|
|
|
@@ -101,7 +102,7 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
}
|
|
|
textBig.setY(y);
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
// image
|
|
|
if (null != imageView) {
|
|
|
@@ -233,16 +234,17 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
@Override
|
|
|
public void init(int index, MainContentsCategoryBean bean, IEventListener listener) {
|
|
|
this.index = index;
|
|
|
- this.screenWidth = SuperModel.getInstance().getScreenWidth();
|
|
|
- this.screenHeight = SuperModel.getInstance().getScreenHeight();
|
|
|
- this.textPositionMaxYOnMask = ResourceUtil.dpToPx(218);
|
|
|
- this.textPositionTargetYOnScreen = screenHeight - ResourceUtil.dpToPx(71);
|
|
|
|
|
|
textBig = itemView.findViewById(R.id.text_big);
|
|
|
textSmall = itemView.findViewById(R.id.text_small);
|
|
|
imageView = itemView.findViewById(R.id.image_contents);
|
|
|
imageView.setOnClickListener(v -> listener.onEvent(new Event.Builder(Event.CONTENTS).integer(index).build()));
|
|
|
|
|
|
+ this.screenWidth = SuperModel.getInstance().getScreenWidth();
|
|
|
+ this.screenHeight = SuperModel.getInstance().getScreenHeight();
|
|
|
+ this.textPositionMaxYOnMask = (((ViewGroup.MarginLayoutParams) textBig.getLayoutParams()).topMargin); //ResourceUtil.dpToPx(218); <- 레이아웃의 위치를 최대값으로 지정.
|
|
|
+ this.textPositionTargetYOnScreen = screenHeight - ResourceUtil.dpToPx(71);
|
|
|
+
|
|
|
textBig.setText(bean.getTitle());
|
|
|
textSmall.setText(bean.getSubTitle());
|
|
|
|