本文整理匯總了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);
}