Do is a function for accessing the underlying Android View in a safe
context, the main thread. Do is
- more general than RegisterFragment and may be expanded to other platforms
- simpler to implement (from the Gio side)
and as a bonus, the Do implementation avoids a race condition where
a call to RegisterFragment during an Activity re-create would be ignored.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
The Activity context may not be available, so it's safer and simpler
to use the always available app context.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Android apps may want to run Go code independent of the Gio Android Activity.
Expose a Gio.init Java method public for early loading and initialization of
the Go library.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
RegisterFragment creates an instance of a Java class and registers
it as a Fragment in the window's Context.
Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>