推移イベント呼ぶようにした

This commit is contained in:
r-ca 2023-12-17 14:16:56 +09:00
parent c36246bded
commit e3ebe25cdd
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -6,6 +6,7 @@ import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.RecyclerView;
import java.util.List;
@ -32,6 +33,10 @@ public class DebugMenuListItemAdapter extends RecyclerView.Adapter<DebugMenuList
DebugMenuListItem item = debugMenuListItems.get(position);
holder.title.setText(item.getTitle());
holder.description.setText(item.getDescription());
holder.itemView.setOnClickListener( v -> {
Navigation.findNavController(v).navigate(item.getDestinationId());
});
}
@Override