Permalink
Browse files

whitespace changes

  • Loading branch information...
1 parent c3072e8 commit 3af044d5da8638cd2efa10e69c90378669a49ad4 @jezhiggins jezhiggins committed May 30, 2012
Showing with 78 additions and 78 deletions.
  1. +78 −78 src/net/cyclestreets/RouteByAddressActivity.java
@@ -26,69 +26,69 @@
import android.widget.RelativeLayout.LayoutParams;
public class RouteByAddressActivity extends Activity
- implements View.OnClickListener
+ implements View.OnClickListener
{
private LinearLayout placeHolder_;
- private List<PlaceView> places_;
- private RadioGroup routeType_;
- private Button routeGo_;
- private Button addWaypoint_;
-
- private BoundingBoxE6 bounds_;
- private GeoPoint currentLoc_;
- private List<GeoPoint> waypoints_;
-
- @Override
- public void onCreate(final Bundle saved)
- {
- super.onCreate(saved);
+ private List<PlaceView> places_;
+ private RadioGroup routeType_;
+ private Button routeGo_;
+ private Button addWaypoint_;
+
+ private BoundingBoxE6 bounds_;
+ private GeoPoint currentLoc_;
+ private List<GeoPoint> waypoints_;
+
+ @Override
+ public void onCreate(final Bundle saved)
+ {
+ super.onCreate(saved);
- setContentView(R.layout.routebyaddress);
- getWindow().setGravity(Gravity.TOP|Gravity.FILL_HORIZONTAL);
- getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
- getWindow().setBackgroundDrawableResource(R.drawable.empty);
+ setContentView(R.layout.routebyaddress);
+ getWindow().setGravity(Gravity.TOP|Gravity.FILL_HORIZONTAL);
+ getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
+ getWindow().setBackgroundDrawableResource(R.drawable.empty);
final Intent intent = getIntent();
bounds_ = GeoIntent.getBoundingBox(intent);
currentLoc_ = GeoIntent.getGeoPoint(intent);
-
- placeHolder_ = (LinearLayout)findViewById(R.id.places);
-
- places_ = new ArrayList<PlaceView>();
-
- waypoints_ = new ArrayList<GeoPoint>();
- for(int w = 0; ; ++w)
- {
- final GeoPoint wp = GeoIntent.getGeoPoint(intent, "WP" + w);
+
+ placeHolder_ = (LinearLayout)findViewById(R.id.places);
+
+ places_ = new ArrayList<PlaceView>();
+
+ waypoints_ = new ArrayList<GeoPoint>();
+ for(int w = 0; ; ++w)
+ {
+ final GeoPoint wp = GeoIntent.getGeoPoint(intent, "WP" + w);
- if(wp == null)
- break;
+ if(wp == null)
+ break;
- waypoints_.add(wp);
- } // for ...
-
- routeGo_ = (Button) findViewById(R.id.routeGo);
- routeGo_.setOnClickListener(this);
-
- addWaypoint_ = (Button)findViewById(R.id.addVia);
- addWaypoint_.setOnClickListener(this);
-
- routeType_ = (RadioGroup) findViewById(R.id.routeTypeGroup);
- routeType_.check(RouteTypeMapper.idFromName(CycleStreetsPreferences.routeType()));
-
- addWaypointBox();
- addWaypointBox();
+ waypoints_.add(wp);
+ } // for ...
+
+ routeGo_ = (Button) findViewById(R.id.routeGo);
+ routeGo_.setOnClickListener(this);
+
+ addWaypoint_ = (Button)findViewById(R.id.addVia);
+ addWaypoint_.setOnClickListener(this);
+
+ routeType_ = (RadioGroup) findViewById(R.id.routeTypeGroup);
+ routeType_.check(RouteTypeMapper.idFromName(CycleStreetsPreferences.routeType()));
+
+ addWaypointBox();
+ addWaypointBox();
} // RouteActivity
- private void addWaypointBox()
- {
- final PlaceView pv = new PlaceView(this);
-
+ private void addWaypointBox()
+ {
+ final PlaceView pv = new PlaceView(this);
+
pv.setBounds(bounds_);
if(currentLoc_ != null)
pv.allowCurrentLocation(currentLoc_, places_.size() == 0);
-
+
for(int w = 0; w != waypoints_.size(); ++w)
{
String label = "Waypoint " + w;
@@ -105,37 +105,37 @@ else if(w+1 == waypoints_.size())
placeHolder_.addView(pv);
addWaypoint_.setEnabled(places_.size() < 12);
- } // addWaypointBox
-
- private void findRoute(final List<GeoPlace> waypoints)
- {
- for(final GeoPlace wp : waypoints)
- for(final PlaceView p : places_)
- p.addHistory(wp);
-
- // return start and finish points to RouteMapActivity and close
- final Intent intent = new Intent(RouteByAddressActivity.this, RouteMapActivity.class);
- for(int i = 0; i != waypoints.size(); ++i)
- GeoIntent.setGeoPoint(intent, "WP" + i, waypoints.get(i).coord());
- final String routeType = RouteTypeMapper.nameFromId(routeType_.getCheckedRadioButtonId());
- intent.putExtra(CycleStreetsConstants.EXTRA_ROUTE_TYPE, routeType);
- setResult(RESULT_OK, intent);
- finish();
- } // findRoute
+ } // addWaypointBox
+
+ private void findRoute(final List<GeoPlace> waypoints)
+ {
+ for(final GeoPlace wp : waypoints)
+ for(final PlaceView p : places_)
+ p.addHistory(wp);
+
+ // return start and finish points to RouteMapActivity and close
+ final Intent intent = new Intent(RouteByAddressActivity.this, RouteMapActivity.class);
+ for(int i = 0; i != waypoints.size(); ++i)
+ GeoIntent.setGeoPoint(intent, "WP" + i, waypoints.get(i).coord());
+ final String routeType = RouteTypeMapper.nameFromId(routeType_.getCheckedRadioButtonId());
+ intent.putExtra(CycleStreetsConstants.EXTRA_ROUTE_TYPE, routeType);
+ setResult(RESULT_OK, intent);
+ finish();
+ } // findRoute
- @Override
- public void onClick(final View view)
- {
- switch(view.getId())
- {
- case R.id.routeGo:
- resolvePlaces();
- break;
- case R.id.addVia:
- addWaypointBox();
- break;
- } // switch
- } // onClick
+ @Override
+ public void onClick(final View view)
+ {
+ switch(view.getId())
+ {
+ case R.id.routeGo:
+ resolvePlaces();
+ break;
+ case R.id.addVia:
+ addWaypointBox();
+ break;
+ } // switch
+ } // onClick
private void resolvePlaces()
{

0 comments on commit 3af044d

Please sign in to comment.