-
Notifications
You must be signed in to change notification settings - Fork 112
Introduces AndroidViewRendering, de-emphasizes ViewRegistry #248
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
7ac619d to
727ab92
Compare
workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/ViewRegistry.kt
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/AndroidViewContainer.kt
Outdated
Show resolved
Hide resolved
workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/AndroidViewContainer.kt
Outdated
Show resolved
Hide resolved
workflow-ui/core-common/src/main/java/com/squareup/workflow1/ui/ViewRendering.kt
Outdated
Show resolved
Hide resolved
727ab92 to
4e63f72
Compare
8a2ef20 to
9ec46e7
Compare
samples/containers/app-poetry/src/main/java/com/squareup/sample/poetryapp/PoemListView.kt
Outdated
Show resolved
Hide resolved
e9cc34f to
48a52bb
Compare
samples/containers/app-poetry/src/main/java/com/squareup/sample/poetryapp/PoemListView.kt
Outdated
Show resolved
Hide resolved
workflow-ui/core-android/src/main/java/com/squareup/workflow1/ui/AndroidViewRendering.kt
Outdated
Show resolved
Hide resolved
48a52bb to
28f96d0
Compare
|
Update renames *View back to *Rendering. |
28f96d0 to
e49d9a9
Compare
|
Rebasing, rebasing, I can't keep up with Zach! |
`AndroidViewRendering` is implemented by renderings that can provide their own `ViewFactory`. `ViewRegistry.buildView` looks to see if a given rendering implements that method if it fails to find an entry for it -- note that we look for a registration first, so `ViewRegistry` is able override the default. Given this, it's no longer crucial for developers to define and provide a `ViewRegistry`, so we get rid of all the nannying that forced them to provide one. Updates the samples to use the new interface and drop their `ViewRegistry` instances where possible.
e49d9a9 to
efb518b
Compare
steve-the-edwards
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool; will this be the first in a category of "Platform"ViewRendering interfaces do you think>
|
The idea was always for workflow to be able to support different ui frameworks. That doesn't change with this. Although we don't have any immediate plans to implement support for other ones at this time. |
AndroidViewRenderingis implemented by renderings that can provide their ownViewFactory.ViewRegistry.buildViewlooks to see if a given renderingimplements that method if it fails to find an entry for it -- note that we
look for a registration first, so
ViewRegistryis able override the default.Given this, it's no longer crucial for developers to define and provide a
ViewRegistry, so we get rid of all the nannying that forced them to provideone.
Updates the samples to use the new interface and drop their
ViewRegistryinstances where possible.