KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to use a RelativeLayout as custom InfoWindow for my markers, but a I get a NullPointerException every time showInfoWindow is called (via tapping on a Marker or programmatically). I'm using Google Maps Android API v2. Exception: FATAL EXCEPTION: main java.lang.NullPointerException at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:465) at android.view.View.measure(View.java:15172) at maps.a.y.i(Unknown Source) at maps.a.y.a(Unknown Source) at maps.a.w.a(Unknown Source) at maps.a.bd.a(Unknown Source) at maps.y.bw.b(Unknown Source) at maps.y.bw.a(Unknown Source) at maps.a.dh.a(Unknown Source) at maps.a.n.c(Unknown Source) at maps.a.dw.a(Unknown Source) at maps.a.bd.c(Unknown Source) at maps.a.dq.onSingleTapConfirmed(Unknown Source) at maps.e.v.onSingleTapConfirmed(Unknown Source) at maps.e.j.handleMessage(Unknown Source) ... My code: *custom_infowindow.xml* <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dip" > <ImageView android:id="@+id/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:paddingLeft="10dip" android:paddingRight="10dip" android:paddingTop="5dip" android:src="@drawable/icon" /> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_toLeftOf="@id/icon" android:ellipsize="end" androi
Tags (comma-separated)
Save Edits
Cancel