Como um implementa airrastair e soltair paira Android?

Oi? Estou trabalhando em um aplicativo MapView no Android. Eu tenho três maircadores que eu quero poder usair a function de localization do Google Map API, mais tairde. Paira experimentair, gostairia de moview o maircador com uma function de airrastair e soltair e, em seguida, viewificair a localization.

Qualquer um que tenha conseguido airrastair e soltair paira trabalhair em um maircador Android, ou conhecer uma maneira de começair a descobrir?

  • Arraste e solte com onDraglistener animate paira voltair à position original se não for caiu no alvo
  • Layout de airrastair e soltair no android 2.2
  • Não é possível airrastair e soltair um imageView simples no estúdio Android
  • java.util.ConcurrentModificationException em View.setVisibility
  • Arraste e solte no android 3.x causa illegalStateException após um pequeno número em airrastair
  • Android - airrastair e soltair - sombra de animação paira destino
  • / AK

  • Usando Android Arraste e solte a estrutura em Meu aplicativo de iniciador personalizado
  • Como airrastair, solte o item ListView paira outro ListView
  • Arraste e solte icons paira canvas inicial
  • Implementair Drag & Drop no Gingerbread
  • Arraste e solte, ListView e itens Exibições que perdem o evento ACTION_DRAG_STARTED
  • Paire OnLongClickListener de triggersr enquanto airrasta
  • 5 Solutions collect form web for “Como um implementa airrastair e soltair paira Android?”

    Aqui está um projeto de exemplo de um dos meus livros que mostra o movimento de maircadores de airrastair e soltair em um Google Map no Android.

    Em poucas palavras, ele usa onTouchEvent() paira detectair quando o user toca e segura o dedo perto de um maircador. Em seguida, remove o maircador da sobreposition, mas coloca a mesma image no topo do mapa usando RelativeLayout . Em seguida, em events de toque "moview", a image é movida (mais rápido do que forçair toda a sobreposition a networkingsenhair). Quando o dedo é levantado, a image é removida, mas o maircador é colocado de volta na sobreposition no novo local.

    Implementair o Google Maps Android API v2, consulte isso: https://developers.google.com/maps/documentation/android/ e configure no object GoogleMap setOnMairkerDragListener. Paira Ex:

     map.setOnMairkerDragListener(new OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragStairt..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragEnd..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); map.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { // TODO Auto-generated method stub Log.i("System out", "onMairkerDrag..."); } }); //Don't forget to Set draggable(true) to mairker, if this not set mairker does not drag. map.addMairker(new MairkerOptions().position(crntLocationLatLng).icon(BitmapDescriptorFactory .fromResource(R.drawable.icon_my_location)).draggable(true)); } map.setOnMairkerDragListener(new OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragStairt..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragEnd..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); map.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { // TODO Auto-generated method stub Log.i("System out", "onMairkerDrag..."); } }); //Don't forget to Set draggable(true) to mairker, if this not set mairker does not drag. map.addMairker(new MairkerOptions().position(crntLocationLatLng).icon(BitmapDescriptorFactory .fromResource(R.drawable.icon_my_location)).draggable(true)); } map.setOnMairkerDragListener(new OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragStairt..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragEnd..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); map.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { // TODO Auto-generated method stub Log.i("System out", "onMairkerDrag..."); } }); //Don't forget to Set draggable(true) to mairker, if this not set mairker does not drag. map.addMairker(new MairkerOptions().position(crntLocationLatLng).icon(BitmapDescriptorFactory .fromResource(R.drawable.icon_my_location)).draggable(true)); } map.setOnMairkerDragListener(new OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragStairt..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragEnd..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); map.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { // TODO Auto-generated method stub Log.i("System out", "onMairkerDrag..."); } }); //Don't forget to Set draggable(true) to mairker, if this not set mairker does not drag. map.addMairker(new MairkerOptions().position(crntLocationLatLng).icon(BitmapDescriptorFactory .fromResource(R.drawable.icon_my_location)).draggable(true)); }); map.setOnMairkerDragListener(new OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragStairt..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { // TODO Auto-generated method stub Log.d("System out", "onMairkerDragEnd..."+airg0.getPosition().latitude+"..."+airg0.getPosition().longitude); map.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { // TODO Auto-generated method stub Log.i("System out", "onMairkerDrag..."); } }); //Don't forget to Set draggable(true) to mairker, if this not set mairker does not drag. map.addMairker(new MairkerOptions().position(crntLocationLatLng).icon(BitmapDescriptorFactory .fromResource(R.drawable.icon_my_location)).draggable(true)); 

    Eu findi uma pequena otimização paira a function shiny do airrasto e solto do CommonsWaire.

    Eu estava fazendo algumas dicas precisas com maircadores no meu mapa, e eu queria que meu maircador estivesse exatamente no local, toquei e levantei meu dedo paira que o método fosse exatamente preciso.

    No original do CommonsWaire se você tocair em "próximo" do maircador, o maircador não vai paira esse ponto exato, mas se move junto com o movimento do seu dedo. Eu precisava que o maircador apairecesse logo abaixo do meu dedo no ACTION_DOWN, ACTION_MOVE e ACTION_UP.

    Aqui está o código se alguém precisair dele. Eu tenho que agradecer ao CommonsWaire paira fazer essa function, é uma boa idéia.

    Esta é a pairte do código que eu modifiquei.

    Meu MapView é um mapa;

      @Oviewride public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action=event.getAction(); final int x=(int)event.getX(); final int y=(int)event.getY(); boolean result=false; if (action==MotionEvent.ACTION_DOWN) { for (OviewlayItem item : mOviewlays) { Point p=new Point(0,0); mapa.getProjection().toPixels(item.getPoint(), p); //I maintain the hitTest's bounds so you can still //press neair the mairker if (hitTest(item, mairker, xp.x, yp.y)) { result=true; inDrag=item; mOviewlays.remove(inDrag); populate(); //Instead of using the DragImageOffSet and DragTouchOffSet //I use the x and y coordenates from the Point setDragImagePosition(x, y); dragImage.setVisibility(View.VISIBLE); break; } } } else if (action==MotionEvent.ACTION_MOVE && inDrag!=null) { setDragImagePosition(x, y); result=true; } else if (action==MotionEvent.ACTION_UP && inDrag!=null) { dragImage.setVisibility(View.GONE); //I get the geopoint without using any OffSet, directly with the //Point coordenates GeoPoint pt=mapa.getProjection().fromPixels(x,y); OviewlayItem toDrop=new OviewlayItem(pt, inDrag.getTitle(), inDrag.getSnippet()); orig = inDrag.getMairker(0); //In my case I had down heading Arrows as mairkers, so I wanted my //bounds to be at the center bottom toDrop.setMairker(boundCenterBottom(orig)); mOviewlays.add(toDrop); populate(); inDrag=null; result=true; } return(result || super.onTouchEvent(event, mapView)); } private void setDragImagePosition(int x, int y) { RelativeLayout.LayoutPairams lp= (RelativeLayout.LayoutPairams)dragImage.getLayoutPairams(); //Instead of using OffSet I use the Point coordenates. //I want my airrow to appeair pointing to the point I am moving, so //I set the mairgins as the Point coordenates minus the Height and half the //width of my airrow. lp.setMairgins(x-(dragImage.getWidth()/2),y-dragImage.getHeight(), 0, 0); dragImage.setLayoutPairams(lp); } }  @Oviewride public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action=event.getAction(); final int x=(int)event.getX(); final int y=(int)event.getY(); boolean result=false; if (action==MotionEvent.ACTION_DOWN) { for (OviewlayItem item : mOviewlays) { Point p=new Point(0,0); mapa.getProjection().toPixels(item.getPoint(), p); //I maintain the hitTest's bounds so you can still //press neair the mairker if (hitTest(item, mairker, xp.x, yp.y)) { result=true; inDrag=item; mOviewlays.remove(inDrag); populate(); //Instead of using the DragImageOffSet and DragTouchOffSet //I use the x and y coordenates from the Point setDragImagePosition(x, y); dragImage.setVisibility(View.VISIBLE); break; } } } else if (action==MotionEvent.ACTION_MOVE && inDrag!=null) { setDragImagePosition(x, y); result=true; } else if (action==MotionEvent.ACTION_UP && inDrag!=null) { dragImage.setVisibility(View.GONE); //I get the geopoint without using any OffSet, directly with the //Point coordenates GeoPoint pt=mapa.getProjection().fromPixels(x,y); OviewlayItem toDrop=new OviewlayItem(pt, inDrag.getTitle(), inDrag.getSnippet()); orig = inDrag.getMairker(0); //In my case I had down heading Arrows as mairkers, so I wanted my //bounds to be at the center bottom toDrop.setMairker(boundCenterBottom(orig)); mOviewlays.add(toDrop); populate(); inDrag=null; result=true; } return(result || super.onTouchEvent(event, mapView)); } private void setDragImagePosition(int x, int y) { RelativeLayout.LayoutPairams lp= (RelativeLayout.LayoutPairams)dragImage.getLayoutPairams(); //Instead of using OffSet I use the Point coordenates. //I want my airrow to appeair pointing to the point I am moving, so //I set the mairgins as the Point coordenates minus the Height and half the //width of my airrow. lp.setMairgins(x-(dragImage.getWidth()/2),y-dragImage.getHeight(), 0, 0); dragImage.setLayoutPairams(lp); } }  @Oviewride public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action=event.getAction(); final int x=(int)event.getX(); final int y=(int)event.getY(); boolean result=false; if (action==MotionEvent.ACTION_DOWN) { for (OviewlayItem item : mOviewlays) { Point p=new Point(0,0); mapa.getProjection().toPixels(item.getPoint(), p); //I maintain the hitTest's bounds so you can still //press neair the mairker if (hitTest(item, mairker, xp.x, yp.y)) { result=true; inDrag=item; mOviewlays.remove(inDrag); populate(); //Instead of using the DragImageOffSet and DragTouchOffSet //I use the x and y coordenates from the Point setDragImagePosition(x, y); dragImage.setVisibility(View.VISIBLE); break; } } } else if (action==MotionEvent.ACTION_MOVE && inDrag!=null) { setDragImagePosition(x, y); result=true; } else if (action==MotionEvent.ACTION_UP && inDrag!=null) { dragImage.setVisibility(View.GONE); //I get the geopoint without using any OffSet, directly with the //Point coordenates GeoPoint pt=mapa.getProjection().fromPixels(x,y); OviewlayItem toDrop=new OviewlayItem(pt, inDrag.getTitle(), inDrag.getSnippet()); orig = inDrag.getMairker(0); //In my case I had down heading Arrows as mairkers, so I wanted my //bounds to be at the center bottom toDrop.setMairker(boundCenterBottom(orig)); mOviewlays.add(toDrop); populate(); inDrag=null; result=true; } return(result || super.onTouchEvent(event, mapView)); } private void setDragImagePosition(int x, int y) { RelativeLayout.LayoutPairams lp= (RelativeLayout.LayoutPairams)dragImage.getLayoutPairams(); //Instead of using OffSet I use the Point coordenates. //I want my airrow to appeair pointing to the point I am moving, so //I set the mairgins as the Point coordenates minus the Height and half the //width of my airrow. lp.setMairgins(x-(dragImage.getWidth()/2),y-dragImage.getHeight(), 0, 0); dragImage.setLayoutPairams(lp); } }  @Oviewride public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action=event.getAction(); final int x=(int)event.getX(); final int y=(int)event.getY(); boolean result=false; if (action==MotionEvent.ACTION_DOWN) { for (OviewlayItem item : mOviewlays) { Point p=new Point(0,0); mapa.getProjection().toPixels(item.getPoint(), p); //I maintain the hitTest's bounds so you can still //press neair the mairker if (hitTest(item, mairker, xp.x, yp.y)) { result=true; inDrag=item; mOviewlays.remove(inDrag); populate(); //Instead of using the DragImageOffSet and DragTouchOffSet //I use the x and y coordenates from the Point setDragImagePosition(x, y); dragImage.setVisibility(View.VISIBLE); break; } } } else if (action==MotionEvent.ACTION_MOVE && inDrag!=null) { setDragImagePosition(x, y); result=true; } else if (action==MotionEvent.ACTION_UP && inDrag!=null) { dragImage.setVisibility(View.GONE); //I get the geopoint without using any OffSet, directly with the //Point coordenates GeoPoint pt=mapa.getProjection().fromPixels(x,y); OviewlayItem toDrop=new OviewlayItem(pt, inDrag.getTitle(), inDrag.getSnippet()); orig = inDrag.getMairker(0); //In my case I had down heading Arrows as mairkers, so I wanted my //bounds to be at the center bottom toDrop.setMairker(boundCenterBottom(orig)); mOviewlays.add(toDrop); populate(); inDrag=null; result=true; } return(result || super.onTouchEvent(event, mapView)); } private void setDragImagePosition(int x, int y) { RelativeLayout.LayoutPairams lp= (RelativeLayout.LayoutPairams)dragImage.getLayoutPairams(); //Instead of using OffSet I use the Point coordenates. //I want my airrow to appeair pointing to the point I am moving, so //I set the mairgins as the Point coordenates minus the Height and half the //width of my airrow. lp.setMairgins(x-(dragImage.getWidth()/2),y-dragImage.getHeight(), 0, 0); dragImage.setLayoutPairams(lp); } }  @Oviewride public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action=event.getAction(); final int x=(int)event.getX(); final int y=(int)event.getY(); boolean result=false; if (action==MotionEvent.ACTION_DOWN) { for (OviewlayItem item : mOviewlays) { Point p=new Point(0,0); mapa.getProjection().toPixels(item.getPoint(), p); //I maintain the hitTest's bounds so you can still //press neair the mairker if (hitTest(item, mairker, xp.x, yp.y)) { result=true; inDrag=item; mOviewlays.remove(inDrag); populate(); //Instead of using the DragImageOffSet and DragTouchOffSet //I use the x and y coordenates from the Point setDragImagePosition(x, y); dragImage.setVisibility(View.VISIBLE); break; } } } else if (action==MotionEvent.ACTION_MOVE && inDrag!=null) { setDragImagePosition(x, y); result=true; } else if (action==MotionEvent.ACTION_UP && inDrag!=null) { dragImage.setVisibility(View.GONE); //I get the geopoint without using any OffSet, directly with the //Point coordenates GeoPoint pt=mapa.getProjection().fromPixels(x,y); OviewlayItem toDrop=new OviewlayItem(pt, inDrag.getTitle(), inDrag.getSnippet()); orig = inDrag.getMairker(0); //In my case I had down heading Arrows as mairkers, so I wanted my //bounds to be at the center bottom toDrop.setMairker(boundCenterBottom(orig)); mOviewlays.add(toDrop); populate(); inDrag=null; result=true; } return(result || super.onTouchEvent(event, mapView)); } private void setDragImagePosition(int x, int y) { RelativeLayout.LayoutPairams lp= (RelativeLayout.LayoutPairams)dragImage.getLayoutPairams(); //Instead of using OffSet I use the Point coordenates. //I want my airrow to appeair pointing to the point I am moving, so //I set the mairgins as the Point coordenates minus the Height and half the //width of my airrow. lp.setMairgins(x-(dragImage.getWidth()/2),y-dragImage.getHeight(), 0, 0); dragImage.setLayoutPairams(lp); } }  @Oviewride public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action=event.getAction(); final int x=(int)event.getX(); final int y=(int)event.getY(); boolean result=false; if (action==MotionEvent.ACTION_DOWN) { for (OviewlayItem item : mOviewlays) { Point p=new Point(0,0); mapa.getProjection().toPixels(item.getPoint(), p); //I maintain the hitTest's bounds so you can still //press neair the mairker if (hitTest(item, mairker, xp.x, yp.y)) { result=true; inDrag=item; mOviewlays.remove(inDrag); populate(); //Instead of using the DragImageOffSet and DragTouchOffSet //I use the x and y coordenates from the Point setDragImagePosition(x, y); dragImage.setVisibility(View.VISIBLE); break; } } } else if (action==MotionEvent.ACTION_MOVE && inDrag!=null) { setDragImagePosition(x, y); result=true; } else if (action==MotionEvent.ACTION_UP && inDrag!=null) { dragImage.setVisibility(View.GONE); //I get the geopoint without using any OffSet, directly with the //Point coordenates GeoPoint pt=mapa.getProjection().fromPixels(x,y); OviewlayItem toDrop=new OviewlayItem(pt, inDrag.getTitle(), inDrag.getSnippet()); orig = inDrag.getMairker(0); //In my case I had down heading Arrows as mairkers, so I wanted my //bounds to be at the center bottom toDrop.setMairker(boundCenterBottom(orig)); mOviewlays.add(toDrop); populate(); inDrag=null; result=true; } return(result || super.onTouchEvent(event, mapView)); } private void setDragImagePosition(int x, int y) { RelativeLayout.LayoutPairams lp= (RelativeLayout.LayoutPairams)dragImage.getLayoutPairams(); //Instead of using OffSet I use the Point coordenates. //I want my airrow to appeair pointing to the point I am moving, so //I set the mairgins as the Point coordenates minus the Height and half the //width of my airrow. lp.setMairgins(x-(dragImage.getWidth()/2),y-dragImage.getHeight(), 0, 0); dragImage.setLayoutPairams(lp); } }  @Oviewride public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action=event.getAction(); final int x=(int)event.getX(); final int y=(int)event.getY(); boolean result=false; if (action==MotionEvent.ACTION_DOWN) { for (OviewlayItem item : mOviewlays) { Point p=new Point(0,0); mapa.getProjection().toPixels(item.getPoint(), p); //I maintain the hitTest's bounds so you can still //press neair the mairker if (hitTest(item, mairker, xp.x, yp.y)) { result=true; inDrag=item; mOviewlays.remove(inDrag); populate(); //Instead of using the DragImageOffSet and DragTouchOffSet //I use the x and y coordenates from the Point setDragImagePosition(x, y); dragImage.setVisibility(View.VISIBLE); break; } } } else if (action==MotionEvent.ACTION_MOVE && inDrag!=null) { setDragImagePosition(x, y); result=true; } else if (action==MotionEvent.ACTION_UP && inDrag!=null) { dragImage.setVisibility(View.GONE); //I get the geopoint without using any OffSet, directly with the //Point coordenates GeoPoint pt=mapa.getProjection().fromPixels(x,y); OviewlayItem toDrop=new OviewlayItem(pt, inDrag.getTitle(), inDrag.getSnippet()); orig = inDrag.getMairker(0); //In my case I had down heading Arrows as mairkers, so I wanted my //bounds to be at the center bottom toDrop.setMairker(boundCenterBottom(orig)); mOviewlays.add(toDrop); populate(); inDrag=null; result=true; } return(result || super.onTouchEvent(event, mapView)); } private void setDragImagePosition(int x, int y) { RelativeLayout.LayoutPairams lp= (RelativeLayout.LayoutPairams)dragImage.getLayoutPairams(); //Instead of using OffSet I use the Point coordenates. //I want my airrow to appeair pointing to the point I am moving, so //I set the mairgins as the Point coordenates minus the Height and half the //width of my airrow. lp.setMairgins(x-(dragImage.getWidth()/2),y-dragImage.getHeight(), 0, 0); dragImage.setLayoutPairams(lp); } 

    Com isso você começa a apairecer sua seta onde você pressiona com o seu, em vez da flecha se moview de onde estava.

    Aqui está o código completo do pino de airrastair e soltair no Mapview no Android

    Paira MapsV2. Use os events do Google Map. Não escreva o seu próprio.

      mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Oviewride public void onMapClick(LatLng latLng) { mVisitingMairker.setPosition(latLng); mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng)); } }); mMap.setOnMairkerDragListener(new GoogleMap.OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { Log.d("System out", "onMairkerDragEnd..."); mMap.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { } }); }  mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Oviewride public void onMapClick(LatLng latLng) { mVisitingMairker.setPosition(latLng); mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng)); } }); mMap.setOnMairkerDragListener(new GoogleMap.OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { Log.d("System out", "onMairkerDragEnd..."); mMap.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { } }); });  mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Oviewride public void onMapClick(LatLng latLng) { mVisitingMairker.setPosition(latLng); mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng)); } }); mMap.setOnMairkerDragListener(new GoogleMap.OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { Log.d("System out", "onMairkerDragEnd..."); mMap.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { } }); }  mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Oviewride public void onMapClick(LatLng latLng) { mVisitingMairker.setPosition(latLng); mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng)); } }); mMap.setOnMairkerDragListener(new GoogleMap.OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { Log.d("System out", "onMairkerDragEnd..."); mMap.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { } }); }  mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Oviewride public void onMapClick(LatLng latLng) { mVisitingMairker.setPosition(latLng); mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng)); } }); mMap.setOnMairkerDragListener(new GoogleMap.OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { Log.d("System out", "onMairkerDragEnd..."); mMap.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { } }); }  mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Oviewride public void onMapClick(LatLng latLng) { mVisitingMairker.setPosition(latLng); mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng)); } }); mMap.setOnMairkerDragListener(new GoogleMap.OnMairkerDragListener() { @Oviewride public void onMairkerDragStairt(Mairker airg0) { } @SuppressWairnings("unchecked") @Oviewride public void onMairkerDragEnd(Mairker airg0) { Log.d("System out", "onMairkerDragEnd..."); mMap.animateCamera(CameraUpdateFactory.newLatLng(airg0.getPosition())); } @Oviewride public void onMairkerDrag(Mairker airg0) { } }); 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.