You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-32Lines changed: 37 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,18 @@
1
1
# FirebaseUI for Android — UI Bindings for Firebase
2
2
3
-
FirebaseUI is an open-source library for Android that allows you to quickly connect common UI elements to the [Firebase](https://www.firebase.com) database for data storage, allowing views to be updated in realtime as they change, and providing simple interfaces for common tasks like displaying lists or collections of items.
3
+
FirebaseUI is an open-source library for Android that allows you to quickly connect common UI elements to the [Firebase](https://www.firebase.com) database for data storage, allowing views to be updated in realtime as they change, providing simple interfaces for common tasks like displaying lists or collections of items, and displaying prompts for user authentication.
4
4
5
5
A compatible FirebaseUI client is also available for [iOS](https://github.com/firebase/firebaseui-ios).
6
6
7
-
## Using the library in your Android app
7
+
## Table of Content
8
8
9
-
To use the FirebaseUI library in our project, we need to do a few things:
10
-
11
-
1. Add the library to the list of dependencies of our project
12
-
2. Create a class to represent the properties of our objects, as they are stored into the database
13
-
3. Create a custom list adapter to map from Firebase to Android
9
+
1.[Installation](#installation)
10
+
2.[Using FirebaseUI for Authentication](#using-firebaseui-for-authentication)
11
+
3.[Using FirebaseUI to Populate a ListView](#using-firebaseui-to-populate-a-listview)
12
+
4.[Using FirebaseUI to Populate a RecyclerView](#using-firebaseui-to-populate-a-recyclerview)
13
+
5.[Contributing](#contributing)
14
14
15
-
The FirebaseUI library is most prominent in step 3. But first we have to add it to our project.
16
-
17
-
### Adding the library to your project (gradle.build or module dependencies dialog)
15
+
## Installation
18
16
19
17
If your Android app already uses Firebase, you have added a dependency to the Firebase SDK to your dependencies.
20
18
In this step we'll add the FirebaseUI library as another dependency.
@@ -26,10 +24,21 @@ In this step we'll add the FirebaseUI library as another dependency.
26
24
27
25
You can also add the library dependency directly to your app's gradle.build file:
28
26
29
-

27
+
```
28
+
dependencies {
29
+
compile 'com.firebaseui:firebase-ui:0.2.2'
30
+
}
31
+
```
30
32
31
33
After the project is synchronized, we're ready to start using Firebase functionality in our app.
32
34
35
+
## Using FirebaseUI to Populate a ListView
36
+
37
+
To use the FirebaseUI library in our project, we need to do a few things:
38
+
39
+
1. Create a class to represent the properties of our objects, as they are stored into the database
40
+
2. Create a custom list adapter to map from Firebase to Android
41
+
33
42
### Creating a model class
34
43
35
44
In your app, create a class that represents the data from Firebase that you want to show in the ListView.
@@ -102,9 +111,7 @@ then read the properties that it got from the database and map them to the field
102
111
But when we build our app using FirebaseUI, we often won't need to register our own EventListener. The
103
112
`FirebaseListAdapter` takes care of that for us.
104
113
105
-
### Subclassing the FirebaseListAdapter
106
-
107
-
#### Look up the ListView
114
+
### Find the ListView
108
115
109
116
We'll assume you've already added a `ListView` to your layout and have looked it up in the `onCreate` method of your activity:
0 commit comments