mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
アダプタ実装 WIP
This commit is contained in:
parent
b44d1b0746
commit
3a47cd97fd
|
@ -6,8 +6,24 @@ import android.view.ViewGroup;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import one.nem.lacerta.model.document.tag.DocumentTag;
|
||||
|
||||
public class TagListItemAdapter extends RecyclerView.Adapter<TagListItemAdapter.TagListItemViewHolder> {
|
||||
|
||||
ArrayList<DocumentTag> documentTags;
|
||||
|
||||
TagListItemSelectListener listener;
|
||||
|
||||
public TagListItemAdapter(TagListItemSelectListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
public void setDocumentTags(ArrayList<DocumentTag> documentTags) {
|
||||
this.documentTags = documentTags;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public TagListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
|
@ -21,7 +37,7 @@ public class TagListItemAdapter extends RecyclerView.Adapter<TagListItemAdapter.
|
|||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 0;
|
||||
return documentTags == null ? 0 : documentTags.size();
|
||||
}
|
||||
|
||||
public static class TagListItemViewHolder extends RecyclerView.ViewHolder {
|
||||
|
|
Loading…
Reference in New Issue
Block a user