You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.RuntimeException: Unable to resume activity {thrillseeker.app.paultons/thrillseeker.app.paultons.activities.ScrollingMapActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class com.qozix.map.MapView
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2120)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2135)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1668)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.qozix.map.MapView
at android.view.LayoutInflater.createView(LayoutInflater.java:508)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:857)
at com.actionbarsherlock.app.SherlockActivity.setContentView(SherlockActivity.java:218)
at thrillseeker.app.paultons.activities.ScrollingMapActivity.onResumeX(ScrollingMapActivity.java:37)
at thrillseeker.app.silverputty.view.SilverActivity.onResume(SilverActivity.java:808)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150)
at android.app.Activity.performResume(Activity.java:3832)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2110)
... 12 more
Caused by: java.lang.NoSuchMethodException: MapView(Context,AttributeSet)
at java.lang.Class.getMatchingConstructor(Class.java:643)
at java.lang.Class.getConstructor(Class.java:472)
at android.view.LayoutInflater.createView(LayoutInflater.java:480)
... 24 more
The text was updated successfully, but these errors were encountered:
It's currently not set up to inflate from XML. For a very basic implementation, you'd need to add a couple different signatures to the constructor... something like this might work (untested):
public MapView(Context context){
super(context);
setup();
}
public MapView(Context context, AttributeSet attrs) {
super(context, attrs);
setup();
}
public MapView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
setup();
}
private void setup(){
zoomManager = new ZoomManager();
touchLayer = new TouchLayer(context);
touchLayer.setGestureListener(touchLayerListener);
addView(touchLayer);
tileLayer = new TileLayer(context);
touchLayer.addLayer(tileLayer);
pathLayer = new PathLayer(context);
touchLayer.addLayer(pathLayer);
markerLayer = new MarkerLayer(context);
touchLayer.addLayer(markerLayer);
requestUpdate();
}
I haven't implemented it fully since best practice would be to offer other options (tile size, patterns, etc), which isn't as straightforward.
Hey, programatically its working pretty good, but how do I load from XML? I tried this:
And the error:
java.lang.RuntimeException: Unable to resume activity {thrillseeker.app.paultons/thrillseeker.app.paultons.activities.ScrollingMapActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class com.qozix.map.MapView
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2120)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2135)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1668)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class com.qozix.map.MapView
at android.view.LayoutInflater.createView(LayoutInflater.java:508)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.actionbarsherlock.internal.ActionBarSherlockCompat.setContentView(ActionBarSherlockCompat.java:857)
at com.actionbarsherlock.app.SherlockActivity.setContentView(SherlockActivity.java:218)
at thrillseeker.app.paultons.activities.ScrollingMapActivity.onResumeX(ScrollingMapActivity.java:37)
at thrillseeker.app.silverputty.view.SilverActivity.onResume(SilverActivity.java:808)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150)
at android.app.Activity.performResume(Activity.java:3832)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2110)
... 12 more
Caused by: java.lang.NoSuchMethodException: MapView(Context,AttributeSet)
at java.lang.Class.getMatchingConstructor(Class.java:643)
at java.lang.Class.getConstructor(Class.java:472)
at android.view.LayoutInflater.createView(LayoutInflater.java:480)
... 24 more
The text was updated successfully, but these errors were encountered: