Skip to content

Readme style fix #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ Gradle, add:

```groovy
dependencies {
// ...
compile 'com.firebaseui:firebase-ui-auth:0.6.0'
// ...
compile 'com.firebaseui:firebase-ui-auth:0.6.0'
}
```

If instead your project uses Maven, add:

```xml
<dependency>
<groupId>com.firebaseui</groupId>
<artifactId>firebase-ui-auth</artifactId>
<version>0.6.0</version>
<groupId>com.firebaseui</groupId>
<artifactId>firebase-ui-auth</artifactId>
<version>0.6.0</version>
</dependency>
```

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

```xml
<resources>
<!-- ... -->
<string name="facebook_application_id" translatable="false">APPID</string>
<!-- ... -->
<string name="facebook_application_id" translatable="false">APPID</string>
</resources>
```

Expand All @@ -86,9 +86,9 @@ whether a
```java
FirebaseAuth auth = FirebaseAuth.getInstance();
if (auth.getCurrentUser() != null) {
// already signed in
// already signed in
} else {
// not signed in
// not signed in
}
```

Expand Down Expand Up @@ -196,18 +196,18 @@ supported.

```java
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RC_SIGN_IN) {
if (resultCode == RESULT_OK) {
// user is signed in!
startActivity(new Intent(this, WelcomeBackActivity.class));
finish();
} else {
// user is not signed in. Maybe just wait for the user to press
// "sign in" again, or show a message
}
}
}
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RC_SIGN_IN) {
if (resultCode == RESULT_OK) {
// user is signed in!
startActivity(new Intent(this, WelcomeBackActivity.class));
finish();
} else {
// user is not signed in. Maybe just wait for the user to press
// "sign in" again, or show a message
}
}
}
```

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

```java
public void onClick(View v) {
if (v.getId() == R.id.sign_out) {
AuthUI.getInstance()
.signOut(this)
.addOnCompleteListener(new OnCompleteListener<Void>() {
if (v.getId() == R.id.sign_out) {
AuthUI.getInstance()
.signOut(this)
.addOnCompleteListener(new OnCompleteListener<Void>() {
public void onComplete(@NonNull Task<Void> task) {
// user is now signed out
startActivity(new Intent(MyActivity.this, SignInActivity.class));
finish();
// user is now signed out
startActivity(new Intent(MyActivity.this, SignInActivity.class));
finish();
}
});
}
});
}
}
```

Expand Down Expand Up @@ -308,8 +308,8 @@ redefine a string to change it, for example:

```java
<resources>
<!-- was "Signing up..." -->
<string name="progress_dialog_signing_up">Creating your shiny new account...</string>
<!-- was "Signing up..." -->
<string name="progress_dialog_signing_up">Creating your shiny new account...</string>
</resources>
```

Expand Down
49 changes: 24 additions & 25 deletions database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,30 @@ We can represent a chat message with this Java class:

```java
public static class Chat {

String name;
String text;
String uid;

public Chat() {
}

public Chat(String name, String uid, String message) {
this.name = name;
this.text = message;
this.uid = uid;
}

public String getName() {
return name;
}

public String getUid() {
return uid;
}

public String getText() {
return text;
}
private String name;
private String text;
private String uid;

public Chat() {
}

public Chat(String name, String uid, String message) {
this.name = name;
this.text = message;
this.uid = uid;
}

public String getName() {
return name;
}

public String getUid() {
return uid;
}

public String getText() {
return text;
}
}
```
A few things to note here:
Expand Down