Skip to content

Commit

Permalink
[WIP] Fixed Typos. getodk#507
Browse files Browse the repository at this point in the history
  • Loading branch information
MukundAnanthu committed May 25, 2017
1 parent e7b34d3 commit ee2ea55
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public void onClick(View v) {
saveGeoTrace();
} else {
alertDialog.dismiss();
showPolyonErrorDialog();
showPolygonErrorDialog();
}
}
});
Expand Down Expand Up @@ -299,7 +299,7 @@ public void onClick(View v) {
zoomPointButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
zoomtoBounds();
zoomToBounds();
zoomDialog.dismiss();
}
});
Expand Down Expand Up @@ -337,7 +337,7 @@ public void onClick(View v) {
locationButton.setEnabled(true);
String s = intent.getStringExtra(GeoTraceWidget.TRACE_LOCATION);
overlayIntentTrace(s);
zoomtoBounds();
zoomToBounds();
}
} else {
if (curLocation != null) {
Expand Down Expand Up @@ -496,7 +496,7 @@ public void onClick(View v) {
@Override
public void onClick(View v) {

zoomtoBounds();
zoomToBounds();

zoomDialog.dismiss();
}
Expand Down Expand Up @@ -546,7 +546,7 @@ private void setupAutomaticMode() {
timeUnitsValue = TimeUnit.SECONDS;
}

setGeoTraceScheuler(timeDelay, timeUnitsValue);
setGeoTraceScheduler(timeDelay, timeUnitsValue);
modeActive = true;
}

Expand Down Expand Up @@ -580,10 +580,10 @@ private void createPolygon() {
}

/*
This functions handels the delay and the Runable for
This functions handles the delay and the Runnable for
*/

public void setGeoTraceScheuler(long delay, TimeUnit units) {
public void setGeoTraceScheduler(long delay, TimeUnit units) {
schedulerHandler = scheduler.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
Expand Down Expand Up @@ -686,7 +686,7 @@ public void onMarkerDragEnd(Marker marker) {
update_polyline();
}

private void showPolyonErrorDialog() {
private void showPolygonErrorDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getString(R.string.polygon_validator))
.setPositiveButton(getString(R.string.dialog_continue),
Expand Down Expand Up @@ -757,7 +757,7 @@ public void onClick(DialogInterface dialog, int id) {
alert.show();
}

private void zoomtoBounds() {
private void zoomToBounds() {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void onClick(final View v) {
}
});

overlayMapLayerListner();
overlayMapLayerListener();
buildDialogs();
Intent intent = getIntent();
if (intent != null && intent.getExtras() != null) {
Expand All @@ -245,7 +245,7 @@ public void onClick(final View v) {
overlayIntentTrace(s);
locationButton.setEnabled(true);
//zoomToCentroid();
zoomtoBounds();
zoomToBounds();

}
} else {
Expand All @@ -264,7 +264,7 @@ public void onClick(View v) {
saveGeoTrace();
} else {
alertDialog.dismiss();
showPolyonErrorDialog();
showPolygonErrorDialog();
}


Expand Down Expand Up @@ -300,7 +300,7 @@ public void onClick(View v) {
@Override
public void onClick(View v) {
//zoomToCentroid();
zoomtoBounds();
zoomToBounds();
mapView.invalidate();
zoomDialog.dismiss();
}
Expand Down Expand Up @@ -368,7 +368,7 @@ protected void onDestroy() {
}


public void setGeoTraceScheuler(long delay, TimeUnit units) {
public void setGeoTraceScheduler(long delay, TimeUnit units) {
schedulerHandler = scheduler.scheduleAtFixedRate(new Runnable() {
@Override
public void run() {
Expand Down Expand Up @@ -402,9 +402,9 @@ public void overlayIntentTrace(String str) {
GeoPoint point = new GeoPoint(gp[0], gp[1]);
point.setAltitude(alt.intValue());
marker.setPosition(point);
marker.setOnMarkerClickListener(nullmarkerlistner);
marker.setOnMarkerClickListener(nullMarkerListener);
marker.setDraggable(true);
marker.setOnMarkerDragListener(draglistner);
marker.setOnMarkerDragListener(dragListener);
marker.setIcon(ContextCompat.getDrawable(getApplicationContext(), R.drawable.ic_place_black_36dp));
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM);
mapMarkers.add(marker);
Expand Down Expand Up @@ -438,7 +438,7 @@ private void upMyLocationOverlayLayers() {
}
}

private void overlayMapLayerListner() {
private void overlayMapLayerListener() {
polyline = new Polyline();
polyline.setColor(Color.RED);
Paint paint = polyline.getPaint();
Expand Down Expand Up @@ -642,24 +642,24 @@ private void setupAutomaticMode() {
timeUnitsValue = TimeUnit.SECONDS;
}

setGeoTraceScheuler(timeDelay, timeUnitsValue);
setGeoTraceScheduler(timeDelay, timeUnitsValue);
modeActive = true;
}

private void addLocationMarker() {
Marker marker = new Marker(mapView);
marker.setPosition(myLocationOverlay.getMyLocation());
Float lastKnownAcuracy =
Float lastKnownAccuracy =
myLocationOverlay.getMyLocationProvider().getLastKnownLocation().getAccuracy();
myLocationOverlay.getMyLocationProvider().getLastKnownLocation().getAccuracy();
marker.setIcon(ContextCompat.getDrawable(getApplicationContext(), R.drawable.ic_place_black_36dp));
marker.setSubDescription(Float.toString(lastKnownAcuracy));
marker.setSubDescription(Float.toString(lastKnownAccuracy));
marker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM);
marker.setDraggable(true);
marker.setOnMarkerDragListener(draglistner);
marker.setOnMarkerDragListener(dragListener);
mapMarkers.add(marker);

marker.setOnMarkerClickListener(nullmarkerlistner);
marker.setOnMarkerClickListener(nullMarkerListener);
mapView.getOverlays().add(marker);
List<GeoPoint> points = polyline.getPoints();
points.add(marker.getPosition());
Expand All @@ -672,7 +672,7 @@ private void saveGeoTrace() {
finish();
}

private void showPolyonErrorDialog() {
private void showPolygonErrorDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getString(R.string.polygon_validator))
.setPositiveButton(getString(R.string.dialog_continue),
Expand Down Expand Up @@ -707,7 +707,7 @@ private void returnLocation() {
finish();
}

private Marker.OnMarkerClickListener nullmarkerlistner = new Marker.OnMarkerClickListener() {
private Marker.OnMarkerClickListener nullMarkerListener = new Marker.OnMarkerClickListener() {

@Override
public boolean onMarkerClick(Marker arg0, MapView arg1) {
Expand All @@ -733,7 +733,7 @@ private void update_polygon() {
}


private Marker.OnMarkerDragListener draglistner = new Marker.OnMarkerDragListener() {
private Marker.OnMarkerDragListener dragListener = new Marker.OnMarkerDragListener() {
@Override
public void onMarkerDragStart(Marker marker) {

Expand Down Expand Up @@ -776,13 +776,13 @@ private void clearFeatures() {
mapView.getOverlays().clear();
clearButton.setEnabled(false);
overlayMyLocationLayers();
overlayMapLayerListner();
overlayMapLayerListener();
mapView.invalidate();
playButton.setEnabled(true);
modeActive = false;
}

private void zoomtoBounds() {
private void zoomToBounds() {
mapView.getController().setZoom(4);
mapView.invalidate();
Handler handler = new Handler();
Expand Down

0 comments on commit ee2ea55

Please sign in to comment.