“RecyclerView: Nenhum gerente de layout anexado; pular layout” Respostas de código

RecyclerView: Nenhum gerente de layout anexado; pular layout

You need to set layout manager
Kotlin:
val linearLayoutManager:LinearLayoutManager = LinearLayoutManager(this)
linearLayoutManager.orientation = LinearLayoutManager.HORIZONTAL{or VERTICAL}
recycleView.layoutManager = linearLayoutManager
Java:
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL{or VERTICAL});
list.setLayoutManager(linearLayoutManager);
Yaroslav

E/RecyclerView: Nenhum gerente de layout anexado; pular layout

 <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/reccylerview"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginTop="8dp"
        android:scrollbars="vertical"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
Witty Walrus

Respostas semelhantes a “RecyclerView: Nenhum gerente de layout anexado; pular layout”

Perguntas semelhantes a “RecyclerView: Nenhum gerente de layout anexado; pular layout”

Procure respostas de código populares por idioma

Procurar outros idiomas de código