Skip to content

Commit

Permalink
Kill indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Nov 12, 2013
1 parent 67fe169 commit e937843
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ Flow is a small library that helps with describing an app as a collection of mod
A screen describes a distinct state of an application. It contains enough information to bootstrap the view.

```java
@Screen(layout = R.layout.track)
public class TrackScreen implements HasParent<AlbumScreen> {
public final int albumId;
public final int trackId;

@Override public AlbumScreen getParent() {
return new AlbumScreen(albumId);
}

public TrackScreen(int albumId, int trackId) {
this.albumId = albumId;
this.trackId = trackId;
}
@Screen(layout = R.layout.track)
public class TrackScreen implements HasParent<AlbumScreen> {
public final int albumId;
public final int trackId;

@Override public AlbumScreen getParent() {
return new AlbumScreen(albumId);
}

public TrackScreen(int albumId, int trackId) {
this.albumId = albumId;
this.trackId = trackId;
}
}
```

The `HasParent` interface is used to support the *up* notion used in Android.
Expand All @@ -34,5 +34,5 @@ The backstack is the history of screens, with the head being the current or last
The flow holds the current truth about your application, the history of screens. It can be told to transition to another screen by simply instantiating the screen you want to go to.

```java
flow.goTo(new TrackScreen(albumId, trackId);
flow.goTo(new TrackScreen(albumId, trackId);
```

0 comments on commit e937843

Please sign in to comment.