|
|
@@ -29,14 +29,14 @@ public class CustomImageTextViewHolder extends RecyclerView.ViewHolder {
|
|
|
|
|
|
public CustomImageTextViewHolder(View itemView, IMainSeriesContract.Listener listener) {
|
|
|
super(itemView);
|
|
|
- imageViewMainCategory = itemView.findViewById(R.id.image_view_main_contents);
|
|
|
- textViewMainCategory = itemView.findViewById(R.id.text_view_main_contents);
|
|
|
-
|
|
|
this.listener = listener;
|
|
|
}
|
|
|
|
|
|
public void bind(CategoryRecommendBean bean) {
|
|
|
|
|
|
+ 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())
|
|
|
.apply(RequestOptions.circleCropTransform())
|
|
|
@@ -52,9 +52,11 @@ public class CustomImageTextViewHolder extends RecyclerView.ViewHolder {
|
|
|
}
|
|
|
|
|
|
public void dispose() {
|
|
|
- imageViewMainCategory.setOnClickListener(null);
|
|
|
- imageViewMainCategory = null;
|
|
|
- textViewMainCategory = null;
|
|
|
- listener = null;
|
|
|
+ if(null != imageViewMainCategory) {
|
|
|
+ imageViewMainCategory.setOnClickListener(null);
|
|
|
+ imageViewMainCategory = null;
|
|
|
+ textViewMainCategory = null;
|
|
|
+ listener = null;
|
|
|
+ }
|
|
|
}
|
|
|
}
|