How to access LayoutElements in Android (ANE)
Hi!
I'm trying to integrate a googlemap-view in an native extension. iOS is fine, but I'm stuck at the Android-part. The map-component itself gets displayed correctly and loads the map-tiles as expected. But if I try to access any element from the xml-layout, the app crashes. The activity now has a static FREContext, which is set in the extension function like this:
public FREObject call(FREContext context, FREObject[] args) {
...
MyMapActivity.freContext = context;
In the activity itself, I set the contentview in onCreate() like this:
setContentView( freContext.getResourceId("layout.activity_map"));
Works fine so far, but uppon accessing the map view, e.g.:
mapView = (MapView)findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
it crashes. This might be due to R not beeing accessable by the extension, but how to work around this? Any help would be really appreciated.
Thanx in advance,
Marcus
