Long clickのリスナーを追加

This commit is contained in:
r-ca 2024-01-29 05:16:35 +09:00
parent 8731855849
commit 83cadceefa
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -44,8 +44,9 @@ public class ViewerBodyAdapter extends RecyclerView.Adapter<ViewerBodyAdapter.Vi
public void onBindViewHolder(@NonNull ViewerBodyAdapter.ViewHolder holder, int position) { public void onBindViewHolder(@NonNull ViewerBodyAdapter.ViewHolder holder, int position) {
Bitmap bitmap = pages.get(position).getBitmap(); Bitmap bitmap = pages.get(position).getBitmap();
holder.image.setImageBitmap(bitmap); holder.image.setImageBitmap(bitmap);
holder.itemView.setOnClickListener(v -> { holder.itemView.setOnLongClickListener(v -> {
listener.onItemLongClick(pages.get(position).getFileName(), position);
return true;
}); });
} }