TagAdapter実装 WIP

This commit is contained in:
r-ca 2024-01-28 22:50:09 +09:00
parent 10621d2935
commit ab92c6ce93
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -0,0 +1,44 @@
package one.nem.lacerta.feature.library;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.google.android.material.chip.Chip;
import java.util.ArrayList;
import one.nem.lacerta.model.document.tag.DocumentTag;
public class TagAdapter extends BaseAdapter {
private ArrayList<DocumentTag> tagList;
@Override
public int getCount() {
return 0;
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Chip chip;
if (convertView == null) {
chip = new Chip(parent.getContext());
}
else {
chip = (Chip) convertView;
}
chip.setText(tagList.get(position).getName());
return chip;
}
}