Last active
August 2, 2017 06:49
-
-
Save namhyun-gu/1d57983c941e7be1c7e14bd0472a2096 to your computer and use it in GitHub Desktop.
Meaning of RecyclerView.setHasFixedSize
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
// Reference document | |
// https://developer.android.com/reference/android/support/v7/widget/RecyclerView.html#setHasFixedSize(boolean) | |
// stackoverflow: https://stackoverflow.com/questions/28827597/when-do-we-use-the-recyclerview-sethasfixedsize | |
RecyclerView recyclerView = findViewById(R.id.recyclerview_id); | |
recyclerView.setHasFixedSize(true); // Not depend on the adapter content. | |
recyclerView.setHasFixedSize(false); // Depend on the adapter content. | |
// * Default value is false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment