CheckBoxのId変更

This commit is contained in:
r-ca 2024-01-29 00:32:17 +09:00
parent d794bb97b6
commit 4770977e66
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,6 @@
package one.nem.lacerta.component.common;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@ -50,6 +51,9 @@ public class LacertaApplyTagAdapter extends RecyclerView.Adapter<LacertaApplyTag
@Override
public void onBindViewHolder(@NonNull LacertaApplyTagAdapter.LacertaApplyTagViewHolder holder, int position) {
DocumentTagApplyTagDialogExtendedModel documentTag = documentTagArrayList.get(position);
if (holder.checkBox == null) {
Log.d("LacertaApplyTagAdapter", "onBindViewHolder: holder.checkBox is null");
}
holder.checkBox.setText(documentTag.getName());
holder.checkBox.setChecked(documentTag.getIsChecked());
holder.checkBox.setOnCheckedChangeListener((buttonView, isChecked) -> {
@ -73,7 +77,7 @@ public class LacertaApplyTagAdapter extends RecyclerView.Adapter<LacertaApplyTag
public LacertaApplyTagViewHolder(@NonNull View itemView) {
super(itemView);
checkBox = itemView.findViewById(R.id.checkBox);
checkBox = itemView.findViewById(R.id.tag_check_box);
}
}
}

View File

@ -4,7 +4,7 @@
android:layout_height="match_parent">
<CheckBox
android:id="@+id/checkBox"
android:id="@+id/tag_check_box"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="16sp"