I have a recyclerview with firebase backend. I want to show latest item on top in my view. I just use setStackFromEnd(true); in my layoutmanager but its show error jutst like this
My minimum SDK Version is 16 and I used to <androidx.recyclerview.widget.RecyclerView
and this is my java code
MCC=FirebaseDatabase.getInstance().getReference().child("Troll");
recyclerView = (RecyclerView) findViewById(R.id.TrollID_recyclerView);
recyclerView.setHasFixedSize(true);
layoutManager = new LinearLayoutManager(this);
recyclerView.setLayoutManager(new GridLayoutManager(this, 1));
LoadData(categoryId);