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: codelabs/chat/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -172,16 +172,16 @@ Next we'll send data to Firebase! In this step we'll allow the user to enter a m
172
172
android:text="Send" />
173
173
</LinearLayout>
174
174
175
-
This layout puts a horizontal bar at the bottom that contains an `EditText`, where the user can enter their chat message, and a `Button` that they can click to send the message.
175
+
This layout puts a horizontal bar at the bottom that contains an `EditText`, where the user can enter their chat message, and a `Button` that they can click to send the message.
176
176
177
-

177
+

178
178
179
179
2. In our `MainActivity.java` we'll now add variables for the `EditText` and `Button` at the end of the onCreate method:
180
180
181
181
final EditText textEdit = (EditText) this.findViewById(R.id.text_edit);

184
+

185
185
186
186
3. Next, we'll add a method that grabs the text from the input and send it to our Firebase database:
187
187
@@ -203,7 +203,7 @@ Next we'll send data to Firebase! In this step we'll allow the user to enter a m
203
203
204
204
We hard-coded our user name for the moment. We'll use Firebase Authentication to make this dynamic in the last section of this code lab.
205
205
206
-

206
+

207
207
208
208
5. If you now run the application in the emulator, you will see an input field with a Send button that sends the message to Firebase. Open the URL of your Firebase database, and you'll see it light up green as you add new messages.
209
209
6. Open the Data tab in the Firebase Dashboard of your app. You'll see it light up green as you add new messages. Admit it, this is pretty cool!
0 commit comments