I wanted to create Reverse Order in my recyclerview.
(我想在recyclerview中创建逆向订单。)
recyclerView = findViewById(R.id.rv);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new LinearLayoutManager(this).setReverseLayout(true));
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:reverseLayout="true"
app:stackFromEnd="true"/>
But I got error that said setLayoutManager cannot be applied (void)
(但是我收到一个错误,说无法应用setLayoutManager(无效))
this is what I have tried
(这就是我尝试过的)
ask by last gg translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…