I am creating an extension of ItemizedOverlay. When a user taps a pin on the map (onTap) I want to display a RelativeLayout, which is included in the same .xml file as the map. When the RelativeLayout is visable, it covers the map.
Since this view is the context for the main class, I do not know how to access the view (DetailLayout) from within the onTap() call.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainlayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="MY KEY HERE"
/>
<RelativeLayout
android:id="@+id/DetailLayout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="left"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:id="@+id/DetailCloseButtonLayout"
android:layout_width="fill_parent"
android:layout_height="36dp"
android:gravity="center_vertical|right"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="@+id/DetailCloseButton"
android:background="@drawable/close"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_marginRight="10dp"
android:gravity="center_vertical">
</Button>
</LinearLayout>
<TextView
android:text="Detail Here. Detail Here."
android:id="@+id/DetailTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/DetailCloseButtonLayout">
</TextView>
</RelativeLayout>