本文整理汇总了Java中com.google.android.gms.maps.MapView.setClickable方法的典型用法代码示例。如果您正苦于以下问题:Java MapView.setClickable方法的具体用法?Java MapView.setClickable怎么用?Java MapView.setClickable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.gms.maps.MapView
的用法示例。
在下文中一共展示了MapView.setClickable方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupMap
import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
protected void setupMap(){
// GoogleMapOptions to Set Map to Lite Mode
GoogleMapOptions googleMapOptions = new GoogleMapOptions().liteMode(true);
mMapView = new MapView(this, googleMapOptions);
mMapView.setClickable(false);
mMapView.setLayoutParams(new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT));
mMapView.setMinimumHeight(MAP_HEIGHT);
mMapContainer.addView(mMapView);
mMapContainer.setMinimumHeight(MAP_HEIGHT);
mMapView.onCreate(null);
mMapView.onResume();
mMapView.getMapAsync(this);
}
示例2: PlaceViewHolder
import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
public PlaceViewHolder(View itemView) {
super(itemView);
mContainer = (RelativeLayout) itemView.findViewById(R.id.item_place_container);
mAlias = (TextView) itemView.findViewById(R.id.item_place_alias);
mAddress = (TextView) itemView.findViewById(R.id.item_place_address);
mMapView = (MapView) itemView.findViewById(R.id.item_place_map);
mMapView.setClickable(false);
// Initialise the MapView
mMapView.onCreate(null);
// Set the map ready callback to receive the GoogleMap object
mMapView.getMapAsync(this);
}
示例3: initializeMapView
import com.google.android.gms.maps.MapView; //导入方法依赖的package包/类
private void initializeMapView(MapView mapView) {
mapView.onCreate(null);
mapView.getMapAsync(mInitialOnMapReadyCallback);
// lite mode enabled within map's layout declaration
// Requirement to set clickable to false in order to not open the Google Maps application.
// See: https://developers.google.com/maps/documentation/android-api/events#disabling_click_events_in_lite_mode
mapView.setClickable(false);
}