Donc, la situation est que je veux montrer une carte google sur la page principale avec un tiroir coulissant qui ouvre sur la diapositive de gauche à droite. Je suis capable d'atteindre le même en utilisant ci-dessous xml. Donc, maintenant le problème est que même lorsque le tiroir n'est pas ouvert, je ne suis pas capable de communiquer avec des cartes, c'est-à-dire que je ne suis pas en mesure de déplacer la carte ou d'utiliser la fonction zoom. Cependant, le tiroir fonctionne et il n'y a pas non plus d'erreur d'exécution.comment utiliser les cartes et tiroir coulissant dans le même xml pour l'activité android
xml j'est ce
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- <fragment
android:id="@+id/badMap"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" /> -->
<com.google.android.gms.maps.MapView android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!-- Framelayout to display Fragments -->
<FrameLayout
android:id="@+id/frame_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- Listview to display slider menu -->
<ListView
android:id="@+id/list_slidermenu"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="@color/list_divider"
android:dividerHeight="1dp"
android:listSelector="@drawable/list_selector"
android:background="@color/list_background"/>
Any ideas on how to make google maps touchable?
grâce à l'aide !! Je l'ai utilisé et il montre une ClassCastException que DrawerLayout ne peut pas être converti en MapView. – user3484292
Vérifiez votre identifiant dans java dans onCréer lorsque vous essayez d'initialiser DrawerLayout, je suppose que vous avez mis votre ID MapView au lieu de cela –
Got it .. merci – user3484292