Skip to content

Instantly share code, notes, and snippets.

@fatorx
Last active September 21, 2018 17:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatorx/c0398e5793a1a3d86681 to your computer and use it in GitHub Desktop.
Save fatorx/c0398e5793a1a3d86681 to your computer and use it in GitHub Desktop.
Para inverter a ordem dos itens de um recycler view, para ficar parecido com o formato de mensagens do WhatsApp
recyclerView = (RecyclerView) findViewById(R.id.rvMessagesList);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(MessageThreadActivity.this);
linearLayoutManager.setStackFromEnd(true);
linearLayoutManager.setReverseLayout(false);
recyclerView.setLayoutManager(linearLayoutManager);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment