mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
コールバックにタグを使うように
This commit is contained in:
parent
d562447777
commit
6847af9b9a
|
@ -17,8 +17,8 @@ public class LacertaApplyTagAdapter extends RecyclerView.Adapter<LacertaApplyTag
|
||||||
|
|
||||||
// Listener
|
// Listener
|
||||||
public interface LacertaApplyTagDialogListener {
|
public interface LacertaApplyTagDialogListener {
|
||||||
void itemChecked(View view, int position);
|
void itemChecked(View view, String tagId);
|
||||||
void itemUnchecked(View view, int position);
|
void itemUnchecked(View view, String tagId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
|
@ -54,9 +54,9 @@ public class LacertaApplyTagAdapter extends RecyclerView.Adapter<LacertaApplyTag
|
||||||
holder.checkBox.setChecked(documentTag.getIsChecked());
|
holder.checkBox.setChecked(documentTag.getIsChecked());
|
||||||
holder.checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
holder.checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
listener.itemChecked(buttonView, position);
|
listener.itemChecked(buttonView, documentTag.getId());
|
||||||
} else {
|
} else {
|
||||||
listener.itemUnchecked(buttonView, position);
|
listener.itemUnchecked(buttonView, documentTag.getId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user