Skip to content

Commit 0354751

Browse files
authored
Merge pull request #1316 from square/ray/tutorial-update
Modernize tutorials
2 parents 00de635 + 471d1d7 commit 0354751

File tree

95 files changed

+3034
-3425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+3034
-3425
lines changed

README-templates.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# File Templates
2+
3+
`workflow-file-templates.zip` can be imported into Android Studio / IntelliJ IDEA to add a few Workflow-specific file templates, via _File > Manage IDE Settings > Import Settings…_.
4+
5+
To update the templates:
6+
7+
* edit them in the IDE (_Settings > Editor > File and Code Templates_)
8+
* export them (_File > Manage IDE Settings > Import Settings…_), taking care to clear every checkbox except that for File Templates.

fileTemplates/Stateful Workflow.kt

Lines changed: 0 additions & 87 deletions
This file was deleted.

fileTemplates/Stateless Workflow.kt

Lines changed: 0 additions & 61 deletions
This file was deleted.

install-templates.sh

Lines changed: 0 additions & 27 deletions
This file was deleted.

samples/tutorial/README.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
11
# Tutorial
22

3-
## Stale Docs Warning
4-
5-
**This tutorial is tied to an older version of Workflow, and relies on API that has been deprecated or deleted.**
6-
The general concepts are the same, and refactoring to the current API is straightforward,
7-
so it is still worthwhile to work through the tutorial in its current state until we find time to update it.
8-
(Track that work [here](https://github.com/square/workflow-kotlin/issues/905)
9-
and [here](https://github.com/square/workflow-kotlin/issues/884).)
10-
11-
Here's a summary of what has changed, and what replaces what:
12-
13-
- Use of `ViewRegistry` is now optional, and rare.
14-
Have your renderings implement `AndroidScreen` or `ComposeScreen` to avoid it.
15-
- The API for binding a rendering to UI code has changed as follows, and can all
16-
be avoided if you use `ComposeScreen`:
17-
- `ViewFactory<in RenderingT : Any>` is replaced by `ScreenViewFactory<in ScreenT : Screen>`.
18-
-`LayoutRunner<RenderingT : Any>` is replaced by `ScreenViewRunner<in ScreenT : Screen>`.
19-
- `LayoutRunner.bind` is replaced by `ScreenViewFactory.fromViewBinding`.
20-
- `BackStackScreen` has been moved to package `com.squareup.workflow1.ui.navigation`.
21-
- `EditText.updateText` and `EditText.setTextChangedListener` are replaced by `TextController`
22-
233
## Overview
244

255
Oh hi! Looks like you want build some software with Workflows! It's a bit different from traditional
26-
Android development, so let's go through building a simple little TODO app to get the basics down.
6+
Android development, so let's go through building a simple little To-Do app to get the basics down.
277

288
## Layout
299

@@ -33,7 +13,7 @@ To help with the setup, we have created a few helper modules:
3313

3414
- `tutorial-views`: A set of 3 views for the 3 screens we will be building, `Welcome`, `TodoList`,
3515
and `TodoEdit`.
36-
- `tutorial-base`: This is the starting point to build out the tutorial. It contains layouts that host the views from `TutorialViews` to see how they display.
16+
- `tutorial-base`: This is the starting point to build out the tutorial.
3717
- `tutorial-final`: This is an example of the completed tutorial - could be used as a reference if
3818
you get stuck.
3919

0 commit comments

Comments
 (0)