mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 01:33:16 +00:00
TagAdapter実装 WIP
This commit is contained in:
parent
10621d2935
commit
ab92c6ce93
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user