Skip to content

Commit 5ddea81

Browse files
authored
Update README.md
I've seen (and answered some) a lot of question in StackOverflow that complains about how their RecyclerView not get updated. And some of them got it fixed after they only change the recyclerView.setHasFixedSize to false. And I wonder why they make it true in the first place if they don't know what it does, so I come here and check, and there it is. I don't know why it is there, so please decline my change if it does any kind of harm to this great repository.
1 parent e5c4d34 commit 5ddea81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Just like we did for `FirebaseListAdapter`, we'll create an anonymous subclass f
268268

269269
```java
270270
RecyclerView recycler = (RecyclerView) findViewById(R.id.messages_recycler);
271-
recycler.setHasFixedSize(true);
271+
recycler.setHasFixedSize(false);
272272
recycler.setLayoutManager(new LinearLayoutManager(this));
273273

274274
mAdapter = new FirebaseRecyclerAdapter<Chat, ChatHolder>(Chat.class, android.R.layout.two_line_list_item, ChatHolder.class, mRef) {

0 commit comments

Comments
 (0)