|
@@ -47,10 +47,6 @@ public class ContactsRecyclerAdapter extends RecyclerView.Adapter<ContactItemVie
|
|
|
}
|
|
|
|
|
|
public void setAppViewHolder(@NonNull ContactItemView viewHolder, int index, ContactModel model) {
|
|
|
-
|
|
|
- //viewHolder.mContactIcon.setImageDrawable(mContext.getDrawable(recentModel.getCallType()));
|
|
|
- //viewHolder.mContactHead.setImageDrawable(mContext.getDrawable(recentModel.getContactIcon()));
|
|
|
-
|
|
|
if (viewHolder.mContactIcon != null) {
|
|
|
int callTypeImage = ResUtils.getImageId("call_type_", model.getCallType());
|
|
|
viewHolder.mContactIcon.setImageResource(callTypeImage);
|
|
@@ -66,19 +62,12 @@ public class ContactsRecyclerAdapter extends RecyclerView.Adapter<ContactItemVie
|
|
|
viewHolder.mContactName.setText(model.getName());
|
|
|
}
|
|
|
|
|
|
-// viewHolder.mAppIcon.setOnClickListener(new View.OnClickListener() {
|
|
|
-// @Override
|
|
|
-// public void onClick(View v) {
|
|
|
-// mAppItemOnClickListener.onClick(mPagerType, mViewIndex, index, mAppsList.get(index));
|
|
|
-// }
|
|
|
-// });
|
|
|
-// viewHolder.mAppIcon.setOnLongClickListener(new View.OnLongClickListener() {
|
|
|
-// @Override
|
|
|
-// public boolean onLongClick(View v) {
|
|
|
-// mAppItemOnClickListener.onLongClick(mPagerType, mViewIndex, index, mAppsList.get(index));
|
|
|
-// return true;
|
|
|
-// }
|
|
|
-// });
|
|
|
+ viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ mItemOnClickListener.onClick(mDataList.get(index));
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -104,7 +93,6 @@ public class ContactsRecyclerAdapter extends RecyclerView.Adapter<ContactItemVie
|
|
|
}
|
|
|
|
|
|
public interface ContactItemOnClickListener {
|
|
|
- void onClick(Constant.E_PAGER_TYPE pagerType, int viewIndex, int appIndex, AppModel appModel);
|
|
|
- void onLongClick(Constant.E_PAGER_TYPE pagerType, int viewIndex, int appIndex, AppModel appModel);
|
|
|
+ void onClick(ContactModel contactModel);
|
|
|
}
|
|
|
}
|