Skip to content

Commit 3ccbd66

Browse files
authored
Merge pull request #350 from SUPERCILEX/readme-style-fix
Readme style fix
2 parents a86fdb5 + f3d506f commit 3ccbd66

File tree

2 files changed

+56
-57
lines changed

2 files changed

+56
-57
lines changed

auth/README.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ Gradle, add:
4343

4444
```groovy
4545
dependencies {
46-
// ...
47-
compile 'com.firebaseui:firebase-ui-auth:0.6.0'
46+
// ...
47+
compile 'com.firebaseui:firebase-ui-auth:0.6.0'
4848
}
4949
```
5050

5151
If instead your project uses Maven, add:
5252

5353
```xml
5454
<dependency>
55-
<groupId>com.firebaseui</groupId>
56-
<artifactId>firebase-ui-auth</artifactId>
57-
<version>0.6.0</version>
55+
<groupId>com.firebaseui</groupId>
56+
<artifactId>firebase-ui-auth</artifactId>
57+
<version>0.6.0</version>
5858
</dependency>
5959
```
6060

@@ -72,8 +72,8 @@ the [Facebook developer dashboard](https://developers.facebook.com):
7272

7373
```xml
7474
<resources>
75-
<!-- ... -->
76-
<string name="facebook_application_id" translatable="false">APPID</string>
75+
<!-- ... -->
76+
<string name="facebook_application_id" translatable="false">APPID</string>
7777
</resources>
7878
```
7979

@@ -86,9 +86,9 @@ whether a
8686
```java
8787
FirebaseAuth auth = FirebaseAuth.getInstance();
8888
if (auth.getCurrentUser() != null) {
89-
// already signed in
89+
// already signed in
9090
} else {
91-
// not signed in
91+
// not signed in
9292
}
9393
```
9494

@@ -196,18 +196,18 @@ supported.
196196

197197
```java
198198
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
199-
super.onActivityResult(requestCode, resultCode, data);
200-
if (requestCode == RC_SIGN_IN) {
201-
if (resultCode == RESULT_OK) {
202-
// user is signed in!
203-
startActivity(new Intent(this, WelcomeBackActivity.class));
204-
finish();
205-
} else {
206-
// user is not signed in. Maybe just wait for the user to press
207-
// "sign in" again, or show a message
208-
}
209-
}
210-
}
199+
super.onActivityResult(requestCode, resultCode, data);
200+
if (requestCode == RC_SIGN_IN) {
201+
if (resultCode == RESULT_OK) {
202+
// user is signed in!
203+
startActivity(new Intent(this, WelcomeBackActivity.class));
204+
finish();
205+
} else {
206+
// user is not signed in. Maybe just wait for the user to press
207+
// "sign in" again, or show a message
208+
}
209+
}
210+
}
211211
```
212212

213213
Alternatively, you can register a listener for authentication state changes;
@@ -236,17 +236,17 @@ completed once all necessary sign-out operations are completed:
236236

237237
```java
238238
public void onClick(View v) {
239-
if (v.getId() == R.id.sign_out) {
240-
AuthUI.getInstance()
241-
.signOut(this)
242-
.addOnCompleteListener(new OnCompleteListener<Void>() {
239+
if (v.getId() == R.id.sign_out) {
240+
AuthUI.getInstance()
241+
.signOut(this)
242+
.addOnCompleteListener(new OnCompleteListener<Void>() {
243243
public void onComplete(@NonNull Task<Void> task) {
244-
// user is now signed out
245-
startActivity(new Intent(MyActivity.this, SignInActivity.class));
246-
finish();
244+
// user is now signed out
245+
startActivity(new Intent(MyActivity.this, SignInActivity.class));
246+
finish();
247247
}
248-
});
249-
}
248+
});
249+
}
250250
}
251251
```
252252

@@ -308,8 +308,8 @@ redefine a string to change it, for example:
308308

309309
```java
310310
<resources>
311-
<!-- was "Signing up..." -->
312-
<string name="progress_dialog_signing_up">Creating your shiny new account...</string>
311+
<!-- was "Signing up..." -->
312+
<string name="progress_dialog_signing_up">Creating your shiny new account...</string>
313313
</resources>
314314
```
315315

database/README.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,30 @@ We can represent a chat message with this Java class:
1919

2020
```java
2121
public static class Chat {
22-
23-
String name;
24-
String text;
25-
String uid;
26-
27-
public Chat() {
28-
}
29-
30-
public Chat(String name, String uid, String message) {
31-
this.name = name;
32-
this.text = message;
33-
this.uid = uid;
34-
}
35-
36-
public String getName() {
37-
return name;
38-
}
39-
40-
public String getUid() {
41-
return uid;
42-
}
43-
44-
public String getText() {
45-
return text;
46-
}
22+
private String name;
23+
private String text;
24+
private String uid;
25+
26+
public Chat() {
27+
}
28+
29+
public Chat(String name, String uid, String message) {
30+
this.name = name;
31+
this.text = message;
32+
this.uid = uid;
33+
}
34+
35+
public String getName() {
36+
return name;
37+
}
38+
39+
public String getUid() {
40+
return uid;
41+
}
42+
43+
public String getText() {
44+
return text;
45+
}
4746
}
4847
```
4948
A few things to note here:

0 commit comments

Comments
 (0)