{"action":"opened","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/3609","labels_url":"https://api.github.com/repos/facebook/react-native/issues/3609/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/3609/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/3609/events","html_url":"https://github.com/facebook/react-native/issues/3609","id":112838665,"number":3609,"title":"[Android Native UI Components] Creating a MapView / passing fragments to createViewInstance","user":{"login":"cosmith","id":1194749,"avatar_url":"https://avatars.githubusercontent.com/u/1194749?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmith","html_url":"https://github.com/cosmith","followers_url":"https://api.github.com/users/cosmith/followers","following_url":"https://api.github.com/users/cosmith/following{/other_user}","gists_url":"https://api.github.com/users/cosmith/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmith/subscriptions","organizations_url":"https://api.github.com/users/cosmith/orgs","repos_url":"https://api.github.com/users/cosmith/repos","events_url":"https://api.github.com/users/cosmith/events{/privacy}","received_events_url":"https://api.github.com/users/cosmith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-22T16:15:33Z","updated_at":"2015-10-22T16:15:33Z","closed_at":null,"body":"I'm trying to build a Google Maps Native UI Component for Android and I'm having trouble getting the map to display.\r\n\r\nMy code:\r\n\r\n- basic ReactPackage\r\n```java\r\npublic class GoogleMapPackage implements ReactPackage {\r\n    @Override\r\n    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {\r\n        List<NativeModule> modules = new ArrayList<>();\r\n        modules.add(new GoogleMapModule(reactContext));\r\n        return modules;\r\n    }\r\n\r\n    @Override\r\n    public List<Class<? extends JavaScriptModule>> createJSModules() {\r\n        return Collections.emptyList();\r\n    }\r\n\r\n    @Override\r\n    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {\r\n        return Arrays.<ViewManager>asList(new GoogleMapViewManager());\r\n    }\r\n}\r\n```\r\n\r\n- ViewManager\r\n```java\r\npublic class GoogleMapViewManager extends SimpleViewManager<GoogleMapView> {\r\n    public static final String REACT_CLASS = \"RCTGoogleMap\";\r\n\r\n    @UIProp(UIProp.Type.BOOLEAN)\r\n    public static final String PROP_TRAFFIC_ENABLED = \"trafficEnabled\";\r\n\r\n    @Override\r\n    public String getName() {\r\n        return REACT_CLASS;\r\n    }\r\n\r\n    @Override\r\n    public GoogleMapView createViewInstance(ThemedReactContext context) {\r\n        return new GoogleMapView(context);\r\n    }\r\n\r\n    @Override\r\n    public void updateView(final GoogleMapView view, final CatalystStylesDiffMap props) {\r\n        super.updateView(view, props);\r\n    }\r\n}\r\n```\r\n\r\n- my GoogleMapView\r\n```java\r\npublic class GoogleMapView extends MapView implements OnMapReadyCallback {\r\n    private GoogleMap mMap;\r\n\r\n    public GoogleMapView(Context context) {\r\n        super(context);\r\n        getMapAsync(this);\r\n    }\r\n\r\n    @Override\r\n    public void onMapReady(GoogleMap map) {\r\n        mMap = map;\r\n        Log.d(\"MAP\", \"MAP READY\");\r\n    }\r\n}\r\n```\r\n\r\n`onMapReady` is never called and nothing shows on the screen (if I inspect the component it is there though, with the correct dimensions).\r\n\r\nI'm not sure if my problem is with the Maps SDK or if there is a specific way to display views that I don't understand... The recommended way is to use a Fragment but I couldn't figure out how to use fragments with the `createViewInstance` API. I tried creating and inflating layouts, passing the activity to the `ViewManager`... no luck.\r\n\r\nSo I guess I have 2 questions:\r\n\r\n- is there a way to use `Fragment` in a Native UI Component?\r\n\r\n- or does anyone have a better understanding than me of either the Maps SDK or the way views are handled after they are passed to `createViewInstance`?\r\n\r\nThanks!\r\n"}}