I have made some code for my google map, where I position the camera to one place when the camera is positioned to the first place I toast a message and then I move the camera to another position but the problem is that the toast action doesn't appear for enough time in order to read the message. Is there anyway so I can set the toast lets say for 10 seconds or so ? Here is my code.
public void onFinish() {
LatLng 1= new LatLng(x , y);
LatLng 2= new LatLng(x , y);
GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
map.animateCamera(CameraUpdateFactory.zoomTo(10), 30000,null);
Toast.makeText(getBaseContext(), " I want this message to displayed for 10 seconds.",
Toast.LENGTH_SHORT)
.show();
CameraPosition cameraPosition3 = new CameraPosition.Builder()
.target(1)
.zoom(16)
.bearing(300)
.tilt(30)
.build();
map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition3 ),30000,new
CancelableCallback()
{ public void onFinish() {
LatLng 2= new LatLng(x, y);
GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
map.animateCamera(CameraUpdateFactory.zoomTo(10), 30000,null);
Toast.makeText(getBaseContext(), " This message for 10 seconds.", Toast.LENGTH_SHORT)
CameraPosition cameraPosition3 = new CameraPosition.Builder()
.target(2)
.zoom(16)
.bearing(300)
.tilt(30)
.build();
map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition3 ),30000,null);