8 Commits

Author SHA1 Message Date
amirh
ffbafc852d
Flush all embedded Android views on hot restart. (#5929)
* Flush all embedded Android view on hot restart.

Adds an OnEngineRestarted method to PlatformView, this is currently only
implemented for Android where we need to use it for embedded views.

* review comments followup

* rename to OnPreEngineRestart, call before Clone
2018-08-03 08:54:12 -07:00
amirh
68d81a31f4
Platform Views: Android and MethodChannel APIs, and implementation skeleton. (#5684)
To keep the scope of this CL as small of possible I'm leaving the actual
implementation of the platform view mechanics to a following CL.

This CL introduces:
  * A PlatformViewsController class which will be responsible for creating,
    resizing, and disposing platform views.
  * A PlatformViewRegistry which is exposed through the PluginRegistry
    and allows plugins to register factories for platform views.

Android plugin code will add support for a new platform view type by
implementing PlatformViewFactory, and registering a factory with the
registry, e.g:
```java
registrar.platformViewRegistry().registerViewFactory(
  'webview',
  new FlutterWebViewFactory()
);
```
On the Dart side, the framework will ask the engine to create new
platform views by sending a create message over the platformviews method
channel with the unique platform view type id, dimensions, and a unique
id allocated by the framework for the new platform view instance.
The platformviews method channel is also used for resizing and disposing
platform views.
2018-07-11 14:11:15 -07:00
amirh
51785d244d
Remove unused Java imports (#5663) 2018-07-03 09:21:03 -07:00
Sarah Zakarias
2c5a1bf507
Provide lookup key to access Flutter assets in the APK (#4785) 2018-03-16 12:59:57 +01:00
Mikkel Nygaard Ravn
3656278894
Make deprecated API unavailable (#4722) 2018-02-28 11:14:43 +01:00
Ali Bitek
8e9598df97 Get active Context from the Registrar (#4523) 2018-01-20 08:46:40 +01:00
Mikkel Nygaard Ravn
288897bb46
Fix API typo (#4487) 2018-01-02 15:32:53 +01:00
Zachary Anderson
619f452ece
[Android] Extract the PluginRegistry from the FlutterActivity (#4393) 2017-11-30 11:05:55 -08:00