use of com.example.jingbin.cloudreader.utils.PerfectClickListener in project CloudReader by youlookwhat.
the class DouBanTopAdapter method bindView.
@Override
protected void bindView(BaseBindingHolder holder, SubjectsBean bean, ItemDoubanTopBinding binding, int position) {
binding.setBean(bean);
DensityUtil.setWidthHeight(binding.ivTopPhoto, width, 0.758f);
binding.cvTopMovie.setOnClickListener(new PerfectClickListener() {
@Override
protected void onNoDoubleClick(View v) {
if (listener != null) {
listener.onClick(bean, binding.ivTopPhoto);
}
}
});
binding.cvTopMovie.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
String title = "Top" + (position + 1) + ": " + bean.getTitle();
DialogBuild.showCustom(v, title, "查看详情", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (listener != null) {
listener.onClick(bean, binding.ivTopPhoto);
}
}
});
return false;
}
});
}
Aggregations