Code Monkey home page Code Monkey logo

Comments (2)

rjrjr avatar rjrjr commented on June 12, 2024

The tutorials are indeed out of date, but ScreenViewFactory and LayoutRunner aren't analogs.

Before Screen and Overlay were introduced:

  • A ViewFactory would create a View to be driven by a LayoutRunner function to show renderings of a particular type.
  • These ViewFactory bindings had to be gathered at runtime in ViewRegistry collections.
  • AndroidViewRendering was introduced to allow a rendering to provide its ViewFactory directly, avoiding the ViewRegistry boilerplate and runtime errors.

This year, the Screen and Overlay marker types were created, along with replacements for most of the above. This was done mainly to simplify Android Dialog management. Today:

  • A ScreenViewFactory creates a View to be driven by a ScreenViewRunner function to show a particular type of Screen.
  • An OverlayDialogFactory creates a Dialog to show a particular type of Overlay. There is no Dialog analog to ScreenViewRunner.
  • AndroidScreen replaces AndroidViewRendering, and an analagous AndroidOverlay has been introduced.

Both before and after, ViewRegistry is still available to allow runtime bindings between rendering types and the view system where needed. These runtime bindings can also be used to override those implemented via AndroidScreen and the like.

There are still shortcomings with the updated Workflow UI -- redundancy and assymetry between View and Dialog support, and some inefficieny in Compose support (#546). In 2023, I'm hoping to roll out VisualFactory as a simpler, more flexible replacement for most of the above (#874).

from workflow-kotlin.

rjrjr avatar rjrjr commented on June 12, 2024

tl;dr: we should indeed update the tutorials to use non-deprecated interfaces, and also to encourage the use of AndroidScreen.

from workflow-kotlin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.