tree: d47481f8d11c4ec410a81b40679d3214574b0571 [path history] [tgz]
  1. meta/
  2. BUILD.gn
  3. main.cc
  4. README.md
  5. view_config_demo_view.cc
  6. view_config_demo_view.h
examples/ui/view_config_demo/README.md

ViewConfig demo

This is a simple example of a mod that implements the View FIDL interface whose ViewConfig, and hence Locale, can be set at launch and while the mod is running.

view_config_demo renders its view using Skia. Currently, it simply displays the provided locale ID in a large font in the middle of the view.

It should not be launched directly from the command line, as that offers no way to interact with the View interface.

The simplest way to launch it is with present_view from the Fuchsia shell:

$ fx shell "present_view \
--locale=en-GB \
fuchsia-pkg://fuchsia.com/view_config_demo#meta/view_config_demo.cmx"

You might want to first run killall scenic.cmx to ensure that Scenic isn't already running:

$ fx shell "killall scenic.cmx; \
present_view --locale=en-GB \
fuchsia-pkg://fuchsia.com/view_config_demo#meta/vw_config_demo.cmx"