Hi,
I have a strange problem: I'm trying to inflate a layout with a button
over a MapView, after the user click on a marker on the map. This
layout appears on the map but every kind of button I put in the xml
there seem to be "frozen", they do not respond at the click action (no
animation).
popup.xml:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="150dp"
android:layout_height="fill_parent"
android:background="@drawable/popup_frame"
android:orientation="vertical">
<Button android:id="@+id/prova" android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="trovami" />
</LinearLayout>
the code is in a ItemizedOveraly onTap() method:
ViewGroup parent=(ViewGroup)mapView.getParent();
popup=((MapsActivity)mContext).getLayoutInflater().inflate(R.layout.popup,
parent, false);
((ViewGroup)mapView.getParent()).removeView(popup);
((ViewGroup)mapView.getParent()).addView(popup);
I tried to do this thing in a new project with a layout without
mapView and all works fine.
If I put the layout with the button directly inside the main layout
and I hide/show it, all works fine
thank you
Dani
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en