@@ -41,26 +41,26 @@ public class Chat {
41
41
}
42
42
```
43
43
44
- A few things to note abot this model class:
44
+ A few things to note about this model class:
45
45
46
46
* The getters and setters follow the JavaBean naming pattern which allows Firebase to map
47
47
the data to field names (ex: ` getName() ` provides the ` name ` field).
48
48
* The class has an empty constructor, which is required for Firebase's automatic data mapping.
49
49
50
50
For a properly constructed model class like the ` Chat ` class above, Firebase can perform automatic
51
51
serialization in ` DatabaseReference#setValue() ` and automatic deserialization in
52
- ` DataSnapshot. getValue() ` .
52
+ ` DataSnapshot# getValue() ` .
53
53
54
54
### Querying
55
55
56
- On the main screenof your app, you may want to show the 50 most recent chat messages. With Firebase
56
+ On the main screen of your app, you may want to show the 50 most recent chat messages. With Firebase
57
57
you would use the following query:
58
58
59
59
``` java
60
60
Query query = FirebaseDatabase . getInstance()
61
61
.getReference()
62
62
.child(" chats" )
63
- .limitToLast(50 )
63
+ .limitToLast(50 );
64
64
```
65
65
66
66
To retrieve this data without FirebaseUI, you might use ` addChildEventListener ` to listen for
@@ -140,7 +140,7 @@ FirebaseRecyclerAdapter adapter = new FirebaseRecyclerAdapter<Chat, ChatHolder>(
140
140
};
141
141
```
142
142
143
- Finally attach the adapter to your ` RecyclerView ` with the ` RecyclerView#setAdapter() ` .
143
+ Finally attach the adapter to your ` RecyclerView ` with the ` RecyclerView#setAdapter() ` method .
144
144
Don't forget to also set a ` LayoutManager ` !
145
145
146
146
@@ -226,9 +226,7 @@ FirebaseListAdapter<Chat> adapter = new FirebaseListAdapter<Chat>(options) {
226
226
## Using FirebaseUI with indexed data
227
227
228
228
If your data is [ properly indexed] [ indexed-data ] , change your adapter initialization
229
- to use ` setIndexedQuery ` :
230
-
231
- For a ` RecyclerView ` , use ` FirebaseIndexRecyclerAdapter ` instead of ` FirebaseRecyclerAdapter ` :
229
+ to use ` setIndexedQuery() ` :
232
230
233
231
``` java
234
232
// keyQuery - the Firebase location containing the list of keys to be found in dataRef
@@ -239,11 +237,11 @@ FirebaseRecyclerOptions<Chat> options = new FirebaseRecyclerOptions.Builder<Chat
239
237
.build();
240
238
```
241
239
242
- ` keyQuery ` is the location of your keys, and ` dataRef ` is the location of your data.
240
+ Where ` keyQuery ` is the location of your keys, and ` dataRef ` is the location of your data.
243
241
244
242
### A note on ordering
245
243
246
- The order in which your receive your data depends on the order from ` keyRef ` , not ` dataRef ` :
244
+ The order in which you receive your data depends on the order from ` keyRef ` , not ` dataRef ` :
247
245
248
246
``` javascript
249
247
{
0 commit comments