|
|
@@ -31,6 +31,9 @@ public class CustomImageTextViewHolder extends RecyclerView.ViewHolder {
|
|
|
public CustomImageTextViewHolder(View itemView, IMainSeriesContract.Listener listener) {
|
|
|
super(itemView);
|
|
|
this.listener = listener;
|
|
|
+
|
|
|
+ imageViewMainCategory = itemView.findViewById(R.id.image_view_main_contents);
|
|
|
+ textViewMainCategory = itemView.findViewById(R.id.text_view_main_contents);
|
|
|
}
|
|
|
|
|
|
public void bind(CategoryRecommendBean bean) {
|
|
|
@@ -38,8 +41,6 @@ public class CustomImageTextViewHolder extends RecyclerView.ViewHolder {
|
|
|
}
|
|
|
|
|
|
public void attach() {
|
|
|
- imageViewMainCategory = itemView.findViewById(R.id.image_view_main_contents);
|
|
|
- textViewMainCategory = itemView.findViewById(R.id.text_view_main_contents);
|
|
|
|
|
|
if (null != bean) {
|
|
|
Glide.with(imageViewMainCategory).load(bean.getImageUrl())
|
|
|
@@ -58,9 +59,6 @@ public class CustomImageTextViewHolder extends RecyclerView.ViewHolder {
|
|
|
public void detach() {
|
|
|
if (null != imageViewMainCategory) {
|
|
|
Glide.with(imageViewMainCategory).clear(imageViewMainCategory);
|
|
|
- imageViewMainCategory.setOnClickListener(null);
|
|
|
- imageViewMainCategory = null;
|
|
|
- textViewMainCategory = null;
|
|
|
}
|
|
|
}
|
|
|
}
|