<android.support.wearable.view.DismissOverlayView android:id="@+id/dismiss_overlay" android:layout_height="match_parent" android:layout_width="match_parent"/> private DismissOverlayView mDismissOverlay;
@Override public void onCreate(Bundle savedState) { ... mDismissOverlay = (DismissOverlayView) findViewById(R.id.dismiss_overlay); // Introduce this gesture to the user if necessary mDismissOverlay.setIntroText (R.string.basic_wear_long_press_intro); mDismissOverlay.showIntroIfNecessary(); ... }
@Override public void onMapLongClick(LatLng latLng) { mDismissOverlay.show(); }
@Override public void onMapReady(GoogleMap googleMap) { ... mMap.setOnMapLongClickListener(this); ... }
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:src="@drawable/android_marker"/>
@Override public void onCameraChange(CameraPosition cameraPosition) { // 以下のメソッドでカメラのセンターにアクセス: // cameraPosition.target.latitude および // cameraPosition.target.longitude }
@Override public void onMapReady(GoogleMap googleMap) { ... mMap.setOnCameraChangeListener(this); ... }
0 件のコメント :
コメントを投稿