Created
March 7, 2018 22:33
-
-
Save nikolajakshic/a72886c026a2ed4f7709d757c3a37472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
movieList = setupList(); | |
RecAdapter adapter = new RecAdapter(movieList); | |
RecyclerView recyclerView = findViewById(R.id.recview); | |
// Removes blinks | |
((SimpleItemAnimator) recyclerView.getItemAnimator()).setSupportsChangeAnimations(false); | |
// Standard setup | |
recyclerView.setLayoutManager(new LinearLayoutManager(this)); | |
recyclerView.setAdapter(adapter); | |
recyclerView.setHasFixedSize(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment