0

Есть код

private void initRecyclerView() {
    recyclerView = findViewById(R.id.recycler_view);
    qrAdapter = new QRAdapter(this);
    recyclerView.setAdapter(qrAdapter);
    recyclerView.setLayoutManager(new LinearLayoutManager(
            getApplicationContext(), 
            LinearLayoutManager.HORIZONTAL, 
            false
    ));
}

При наведении на recyclerView.setAdapter(qrAdapter); высвечивается :

setAdapter(androidx.recyclerview.widget.RecyclerView.Adapter)in RecyclerView cannot be applied to (com.example.ayapplication.QR.QRAdapter)

1 ответ 1

4

Очевидно, com.example.ayapplication.QR.QRAdapter не унаследован от androidx.recyclerview.widget.RecyclerView.Adapter

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.