【问题标题】:OnTouchListener on com.google.android.gms.maps.MapViewcom.google.android.gms.maps.MapView 上的 OnTouchListener
【发布时间】:2013-11-06 07:33:25
【问题描述】:

有什么方法可以处理com.google.android.gms.maps.MapView 上的onTouchListener。因为,我尝试了与View 一样的常规方法,但它不起作用。

【问题讨论】:

标签: android android-mapview


【解决方案1】:

android:clickable 属性定义是否允许用户与地图进行交互。如果这是"false",那么触摸地图将无济于事。

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey="API_KEY"
/>

【讨论】:

    猜你喜欢
    • 2016-11-05
    • 2014-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多