Skip to content

Instantly share code, notes, and snippets.

@survivingwithandroid
Created August 28, 2015 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save survivingwithandroid/69eb2ed184ca65045cbc to your computer and use it in GitHub Desktop.
Save survivingwithandroid/69eb2ed184ca65045cbc to your computer and use it in GitHub Desktop.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_my);
RecyclerView recList = (RecyclerView) findViewById(R.id.cardList);
recList.setHasFixedSize(true);
LinearLayoutManager llm = new LinearLayoutManager(this);
llm.setOrientation(LinearLayoutManager.VERTICAL);
recList.setLayoutManager(llm);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment