From ba97935aa32c84e539b097acde5d9f3758c2bf20 Mon Sep 17 00:00:00 2001 From: kingofirony Date: Fri, 19 Jun 2015 17:04:59 -0400 Subject: [PATCH 1/8] adds basic instruction view --- app/src/main/AndroidManifest.xml | 3 ++ .../erasermap/view/InstructionListActivity.kt | 42 +++++++++++++++++++ .../com/mapzen/erasermap/view/MainActivity.kt | 40 ++++++++++++++++++ .../mapzen/erasermap/view/RoutePreviewView.kt | 13 +++++- .../main/res/layout/activity_instructions.xml | 10 +++++ .../main/res/layout/list_item_instruction.xml | 11 +++++ app/src/main/res/values/strings.xml | 1 + 7 files changed, 118 insertions(+), 2 deletions(-) create mode 100644 app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt create mode 100644 app/src/main/res/layout/activity_instructions.xml create mode 100644 app/src/main/res/layout/list_item_instruction.xml diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b67c3cbc..c9564a6a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -26,6 +26,9 @@ + diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt new file mode 100644 index 00000000..56ba0748 --- /dev/null +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt @@ -0,0 +1,42 @@ +package com.mapzen.erasermap.view + +import android.os.Bundle +import android.support.v7.app.AppCompatActivity +import android.view.MenuItem +import android.view.View +import android.widget.ArrayAdapter +import android.widget.ListView +import android.widget.TextView +import com.mapzen.erasermap.R +import com.mapzen.pelias.SimpleFeature +import com.mapzen.valhalla.Instruction +import java.util.* + +public class InstructionListActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_instructions) + getSupportActionBar().setDisplayHomeAsUpEnabled(true) + + val listView = findViewById(R.id.instruction_list_view) as ListView + // val headerView = View.inflate(this, R.layout.list_header_search_results, null) + //val title = headerView.findViewById(R.id.title) as TextView + val bundle = getIntent()?.getExtras() + // val query = bundle?.getString("query") + val instructions: ArrayList? = bundle?.getStringArrayList("instructions") + + if (instructions != null) { + listView.setAdapter(ArrayAdapter(this, R.layout.list_item_instruction, instructions)) + listView.setOnItemClickListener { parent, view, position, id -> + setResult(position) + finish() + } + } + } + + override fun onOptionsItemSelected(item: MenuItem?): Boolean { + setResult(-1) + finish() + return true + } +} diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt index f82543cb..e8dac900 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt @@ -68,6 +68,8 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback public val requestCodeSearchResults: Int = 0x01 + private var reverse = false; + private var route: Route? = null; var locationClient: LostApiClient? = null @Inject set var tileCache: Cache? = null @@ -102,6 +104,7 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback initPoiLayer() initAutoCompleteAdapter() initFindMeButton() + initreverseButton() centerOnCurrentLocation() presenter?.onRestoreViewState() } @@ -417,6 +420,7 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback } override fun success(route: Route?) { + this.route = route; runOnUiThread({ getSupportActionBar()?.hide() findViewById(R.id.route_preview).setVisibility(View.VISIBLE) @@ -534,6 +538,41 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback } } + private fun reverse() { + reverse = !reverse; + (findViewById(R.id.route_preview) as RoutePreviewView).reverse = this.reverse + val simpleFeature = SimpleFeature.fromFeature(destination) + val location = LocationServices.FusedLocationApi?.getLastLocation(); + if(reverse) { + if (location is Location) { + val start: DoubleArray = doubleArrayOf(simpleFeature.getLat(), simpleFeature.getLon()) + val dest: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) + getInitializedRouter().setLocation(start).setLocation(dest).setCallback(this).fetch() + } + } else { + if (location is Location) { + val start: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) + val dest: DoubleArray = doubleArrayOf(simpleFeature.getLat(), simpleFeature.getLon()) + getInitializedRouter().setLocation(start).setLocation(dest).setCallback(this).fetch() + } + } + } + + private fun initreverseButton() { + (findViewById(R.id.route_reverse) as ImageButton).setOnClickListener({ reverse()}) + + (findViewById(R.id.routing_circle) as ImageButton).setOnClickListener ({ + val instructionStrings = ArrayList() + for(instruction in route!!.getRouteInstructions() ) { + instructionStrings.add(instruction.getHumanTurnInstruction()) + } + val intent = Intent(this, javaClass()) + intent.putExtra("instructions", instructionStrings) + startActivityForResult(intent, requestCodeSearchResults) + }) + + } + override fun onBackPressed() { if ((findViewById(R.id.route_preview)).getVisibility() == View.VISIBLE) { mapController?.getMap()?.layers()?.remove(path) @@ -551,3 +590,4 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback return Router().setApiKey(BuildConfig.VALHALLA_API_KEY); } } + diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/RoutePreviewView.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/RoutePreviewView.kt index 606bae64..e80cb1d9 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/view/RoutePreviewView.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/RoutePreviewView.kt @@ -15,14 +15,23 @@ import com.mapzen.valhalla.Router public class RoutePreviewView : RelativeLayout { + public var reverse : Boolean = false public var destination: SimpleFeature? = null set (destination) { - (findViewById(R.id.destination) as TextView).setText(destination?.getTitle()) + if(reverse) { + (findViewById(R.id.starting_point) as TextView).setText(destination?.getTitle()) + } else { + (findViewById(R.id.destination) as TextView).setText(destination?.getTitle()) + } } public var route: Route? = null set (route) { - (findViewById(R.id.starting_point) as TextView).setText(R.string.current_location) + if(reverse) { + (findViewById(R.id.destination) as TextView).setText(R.string.current_location) + } else { + (findViewById(R.id.starting_point) as TextView).setText(R.string.current_location) + } } public constructor(context: Context) : super(context) { diff --git a/app/src/main/res/layout/activity_instructions.xml b/app/src/main/res/layout/activity_instructions.xml new file mode 100644 index 00000000..fd520855 --- /dev/null +++ b/app/src/main/res/layout/activity_instructions.xml @@ -0,0 +1,10 @@ + + + + + diff --git a/app/src/main/res/layout/list_item_instruction.xml b/app/src/main/res/layout/list_item_instruction.xml new file mode 100644 index 00000000..c6fd91fc --- /dev/null +++ b/app/src/main/res/layout/list_item_instruction.xml @@ -0,0 +1,11 @@ + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a709407b..dcfd0aaf 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -7,6 +7,7 @@ No recent searches %1$d of %2$d results Search Results + Instructions From: To: Current Location From 15a2fd4f6c6f320ac10759506de9046073c184aa Mon Sep 17 00:00:00 2001 From: kingofirony Date: Wed, 24 Jun 2015 13:02:19 -0400 Subject: [PATCH 2/8] routing preview with instruction list view pretty --- app/build.gradle | 2 +- .../mapzen/erasermap/util/DisplayHelper.kt | 21 ++++ .../erasermap/view/InstructionListActivity.kt | 112 ++++++++++++++++-- .../com/mapzen/erasermap/view/MainActivity.kt | 88 +++++++------- .../main/res/drawable-hdpi/ic_route_gr_1.png | Bin 0 -> 269 bytes .../main/res/drawable-mdpi/ic_route_gr_1.png | Bin 0 -> 268 bytes .../main/res/drawable-xhdpi/ic_route_gr_1.png | Bin 0 -> 425 bytes .../res/drawable-xxhdpi/ic_route_gr_1.png | Bin 0 -> 377 bytes app/src/main/res/drawable/ic_route_1.png | Bin 0 -> 950 bytes app/src/main/res/drawable/ic_route_10.png | Bin 0 -> 882 bytes app/src/main/res/drawable/ic_route_11.png | Bin 0 -> 1064 bytes app/src/main/res/drawable/ic_route_12.png | Bin 0 -> 927 bytes app/src/main/res/drawable/ic_route_13.png | Bin 0 -> 927 bytes app/src/main/res/drawable/ic_route_14.png | Bin 0 -> 1044 bytes app/src/main/res/drawable/ic_route_15.png | Bin 0 -> 922 bytes app/src/main/res/drawable/ic_route_16.png | Bin 0 -> 1148 bytes app/src/main/res/drawable/ic_route_17.png | Bin 0 -> 895 bytes app/src/main/res/drawable/ic_route_18.png | Bin 0 -> 1127 bytes app/src/main/res/drawable/ic_route_19.png | Bin 0 -> 1129 bytes app/src/main/res/drawable/ic_route_2.png | Bin 0 -> 843 bytes app/src/main/res/drawable/ic_route_20.png | Bin 0 -> 1126 bytes app/src/main/res/drawable/ic_route_21.png | Bin 0 -> 1144 bytes app/src/main/res/drawable/ic_route_22.png | Bin 0 -> 915 bytes app/src/main/res/drawable/ic_route_23.png | Bin 0 -> 1173 bytes app/src/main/res/drawable/ic_route_24.png | Bin 0 -> 1199 bytes app/src/main/res/drawable/ic_route_25.png | Bin 0 -> 1144 bytes app/src/main/res/drawable/ic_route_26.png | Bin 0 -> 1398 bytes app/src/main/res/drawable/ic_route_27.png | Bin 0 -> 1670 bytes app/src/main/res/drawable/ic_route_28.png | Bin 0 -> 1877 bytes app/src/main/res/drawable/ic_route_29.png | Bin 0 -> 1921 bytes app/src/main/res/drawable/ic_route_3.png | Bin 0 -> 777 bytes app/src/main/res/drawable/ic_route_30.png | Bin 0 -> 1756 bytes app/src/main/res/drawable/ic_route_31.png | Bin 0 -> 2304 bytes app/src/main/res/drawable/ic_route_32.png | Bin 0 -> 2308 bytes app/src/main/res/drawable/ic_route_4.png | Bin 0 -> 1696 bytes app/src/main/res/drawable/ic_route_5.png | Bin 0 -> 1982 bytes app/src/main/res/drawable/ic_route_6.png | Bin 0 -> 2012 bytes app/src/main/res/drawable/ic_route_7.png | Bin 0 -> 928 bytes app/src/main/res/drawable/ic_route_8.png | Bin 0 -> 923 bytes app/src/main/res/drawable/ic_route_9.png | Bin 0 -> 1116 bytes .../main/res/layout/activity_instructions.xml | 20 +++- .../main/res/layout/direction_list_item.xml | 41 +++++++ .../main/res/layout/list_header_divider.xml | 18 +++ app/src/main/res/layout/route_header.xml | 2 +- .../layout/route_header_direction_list.xml | 104 ++++++++++++++++ 45 files changed, 348 insertions(+), 60 deletions(-) create mode 100644 app/src/main/kotlin/com/mapzen/erasermap/util/DisplayHelper.kt create mode 100644 app/src/main/res/drawable-hdpi/ic_route_gr_1.png create mode 100644 app/src/main/res/drawable-mdpi/ic_route_gr_1.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_route_gr_1.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_route_gr_1.png create mode 100644 app/src/main/res/drawable/ic_route_1.png create mode 100644 app/src/main/res/drawable/ic_route_10.png create mode 100644 app/src/main/res/drawable/ic_route_11.png create mode 100644 app/src/main/res/drawable/ic_route_12.png create mode 100644 app/src/main/res/drawable/ic_route_13.png create mode 100644 app/src/main/res/drawable/ic_route_14.png create mode 100644 app/src/main/res/drawable/ic_route_15.png create mode 100644 app/src/main/res/drawable/ic_route_16.png create mode 100644 app/src/main/res/drawable/ic_route_17.png create mode 100644 app/src/main/res/drawable/ic_route_18.png create mode 100644 app/src/main/res/drawable/ic_route_19.png create mode 100644 app/src/main/res/drawable/ic_route_2.png create mode 100644 app/src/main/res/drawable/ic_route_20.png create mode 100644 app/src/main/res/drawable/ic_route_21.png create mode 100644 app/src/main/res/drawable/ic_route_22.png create mode 100644 app/src/main/res/drawable/ic_route_23.png create mode 100644 app/src/main/res/drawable/ic_route_24.png create mode 100644 app/src/main/res/drawable/ic_route_25.png create mode 100644 app/src/main/res/drawable/ic_route_26.png create mode 100644 app/src/main/res/drawable/ic_route_27.png create mode 100644 app/src/main/res/drawable/ic_route_28.png create mode 100644 app/src/main/res/drawable/ic_route_29.png create mode 100644 app/src/main/res/drawable/ic_route_3.png create mode 100644 app/src/main/res/drawable/ic_route_30.png create mode 100644 app/src/main/res/drawable/ic_route_31.png create mode 100644 app/src/main/res/drawable/ic_route_32.png create mode 100644 app/src/main/res/drawable/ic_route_4.png create mode 100644 app/src/main/res/drawable/ic_route_5.png create mode 100644 app/src/main/res/drawable/ic_route_6.png create mode 100644 app/src/main/res/drawable/ic_route_7.png create mode 100644 app/src/main/res/drawable/ic_route_8.png create mode 100644 app/src/main/res/drawable/ic_route_9.png create mode 100644 app/src/main/res/layout/direction_list_item.xml create mode 100644 app/src/main/res/layout/list_header_divider.xml create mode 100644 app/src/main/res/layout/route_header_direction_list.xml diff --git a/app/build.gradle b/app/build.gradle index b4875942..4d5191d9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -67,7 +67,7 @@ dependencies { compile 'javax.annotation:javax.annotation-api:1.2' compile 'com.android.support:support-v4:22.1.0@aar' compile 'com.squareup:otto:1.3.7' - compile ('com.mapzen:on-the-road:0.8-SNAPSHOT') { + compile ('com.mapzen:on-the-road:0.81-SNAPSHOT') { exclude group: 'org.apache.commons', module: 'commons-io' } diff --git a/app/src/main/kotlin/com/mapzen/erasermap/util/DisplayHelper.kt b/app/src/main/kotlin/com/mapzen/erasermap/util/DisplayHelper.kt new file mode 100644 index 00000000..4d198928 --- /dev/null +++ b/app/src/main/kotlin/com/mapzen/erasermap/util/DisplayHelper.kt @@ -0,0 +1,21 @@ +package com.mapzen.erasermap.util + +import android.content.Context +import com.mapzen.erasermap.R + +public object DisplayHelper { + + /** + * Fetch the resource drawable ID of the turn icon for the given instruction and style. + + * @param context current context in which to display the icon. + * * + * @param turnInstruction the integer value representing this turn instruction. + * * + * @return the resource ID of the turn icon to display. + */ + public fun getRouteDrawable(context: Context, turnInstruction: Int?): Int { + var drawableId = context.getResources().getIdentifier("ic_route_" + turnInstruction, "drawable", context.getPackageName()) + return drawableId + } +} diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt index 56ba0748..477de281 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt @@ -1,32 +1,37 @@ package com.mapzen.erasermap.view +import android.content.Context +import android.opengl.Visibility import android.os.Bundle import android.support.v7.app.AppCompatActivity import android.view.MenuItem import android.view.View -import android.widget.ArrayAdapter +import android.view.ViewGroup +import android.widget.BaseAdapter import android.widget.ListView import android.widget.TextView +import android.widget.ImageView import com.mapzen.erasermap.R +import com.mapzen.erasermap.util.DisplayHelper import com.mapzen.pelias.SimpleFeature import com.mapzen.valhalla.Instruction -import java.util.* +import com.mapzen.helpers.DistanceFormatter +import java.util.ArrayList public class InstructionListActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_instructions) - getSupportActionBar().setDisplayHomeAsUpEnabled(true) - + getSupportActionBar().hide() val listView = findViewById(R.id.instruction_list_view) as ListView - // val headerView = View.inflate(this, R.layout.list_header_search_results, null) - //val title = headerView.findViewById(R.id.title) as TextView val bundle = getIntent()?.getExtras() - // val query = bundle?.getString("query") - val instructions: ArrayList? = bundle?.getStringArrayList("instructions") - - if (instructions != null) { - listView.setAdapter(ArrayAdapter(this, R.layout.list_item_instruction, instructions)) + val instruction_strings: ArrayList? = bundle?.getStringArrayList("instruction_strings") + val instruction_types: ArrayList? = bundle?.getIntegerArrayList("instruction_types") + val instruction_distances: ArrayList? = bundle?.getIntegerArrayList("instruction_distances") + val reverse : Boolean = bundle?.getBoolean("reverse") as Boolean + setHeaderOrigins(bundle, reverse) + if (instruction_strings != null) { + listView.setAdapter(DirectionListAdapter(this, instruction_strings, instruction_types, instruction_distances, reverse)) listView.setOnItemClickListener { parent, view, position, id -> setResult(position) finish() @@ -34,9 +39,94 @@ public class InstructionListActivity : AppCompatActivity() { } } + private fun setHeaderOrigins(bundle: Bundle?, reverse: Boolean) { + if (reverse) { + (findViewById(R.id.starting_point) as TextView).setText(bundle?.getString("destination")) + (findViewById(R.id.destination) as TextView).setText(R.string.current_location) + findViewById(R.id.starting_location_icon).setVisibility(View.GONE) + findViewById(R.id.destination_location_icon).setVisibility(View.VISIBLE) + } else { + (findViewById(R.id.starting_point) as TextView).setText(R.string.current_location) + (findViewById(R.id.destination) as TextView).setText(bundle?.getString("destination")) + findViewById(R.id.starting_location_icon).setVisibility(View.VISIBLE) + findViewById(R.id.destination_location_icon).setVisibility(View.GONE) + } + } + override fun onOptionsItemSelected(item: MenuItem?): Boolean { setResult(-1) finish() return true } + + private class DirectionListAdapter(context: Context, strings: ArrayList?, + types: ArrayList?, distances: ArrayList?, + reverse : Boolean) : BaseAdapter() { + private final var CURRENT_LOCATION_OFFSET = 1 + private var instruction_strings: ArrayList? = strings + private var instruction_types: ArrayList? = types + private var instruction_distances: ArrayList? = distances + private var context: Context = context + private var reverse : Boolean = reverse; + + override fun getCount(): Int { + return (instruction_strings!!.size() + CURRENT_LOCATION_OFFSET) + } + + override fun getItemId(position: Int): Long { + return 0; + } + + override fun getItem(position: Int): Any? { + return 0; + } + + override fun getView(position: Int, convertView: View?, parent: ViewGroup): View? { + var view: View = View.inflate(context, R.layout.direction_list_item, null) + if(reverse) { + setReversedDirectionListItem(position, view) + } else { + setDirectionListItem(position, view) + } + return view + } + + private fun setReversedDirectionListItem(position : Int, view : View) { + if(position == instruction_strings!!.size()) { + setListItemToCurrentLocation(view); + } else { + var distanceVal : Int = instruction_distances!!.get(position).toInt() + var formattedDistance : String = DistanceFormatter.format(distanceVal) + var iconId : Int = DisplayHelper.getRouteDrawable(context, + instruction_types?.get(position)) + + (view.findViewById(R.id.simple_instruction) as TextView).setText( + instruction_strings?.get(position).toString()) + (view.findViewById(R.id.distance) as TextView).setText(formattedDistance) + (view.findViewById(R.id.icon) as ImageView).setImageResource(iconId) + } + } + + private fun setDirectionListItem(position : Int, view : View) { + if (position == 0 ) { + setListItemToCurrentLocation(view) + } else { + var distanceVal : Int = instruction_distances!! + .get(position - CURRENT_LOCATION_OFFSET).toInt() + var distance : String = DistanceFormatter.format(distanceVal) + var iconId : Int = DisplayHelper.getRouteDrawable(context, + instruction_types?.get(position - CURRENT_LOCATION_OFFSET)) + + (view.findViewById(R.id.simple_instruction) as TextView).setText( + instruction_strings?.get(position - CURRENT_LOCATION_OFFSET).toString()) + (view.findViewById(R.id.distance) as TextView).setText(distance) + (view.findViewById(R.id.icon) as ImageView).setImageResource(iconId) + } + } + + private fun setListItemToCurrentLocation(view : View) { + (view.findViewById(R.id.simple_instruction) as TextView).setText(R.string.current_location) + (view.findViewById(R.id.icon) as ImageView).setImageResource(R.drawable.ic_locate) + } + } } diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt index e8dac900..0efed001 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt @@ -91,6 +91,7 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback var destination: Feature? = null var path: PathLayer? = null var markers: ItemizedLayer? = null + var type : Router.Type = Router.Type.DRIVING override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -216,7 +217,6 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback listView.setEmptyView(emptyView) restoreCurrentSearchTerm() } - return true } @@ -410,13 +410,7 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback override fun showRoutePreview(feature: Feature) { this.destination = feature - val simpleFeature = SimpleFeature.fromFeature(feature) - val location = LocationServices.FusedLocationApi?.getLastLocation(); - if (location is Location) { - val start: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) - val dest: DoubleArray = doubleArrayOf(simpleFeature.getLat(), simpleFeature.getLon()) - getInitializedRouter().setLocation(start).setLocation(dest).setCallback(this).fetch() - } + route() } override fun success(route: Route?) { @@ -482,7 +476,6 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback } catch (e: Exception) { Toast.makeText(this@MainActivity, "No route found", Toast.LENGTH_LONG).show() } - } private fun getMarkerItem(icon: Int, loc: Location, place: MarkerItem.HotspotPlace): MarkerItem { @@ -500,39 +493,43 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback findViewById(R.id.route_preview).setVisibility(View.GONE) } + fun route() { + val simpleFeature = SimpleFeature.fromFeature(destination) + val location = LocationServices.FusedLocationApi?.getLastLocation() + if (reverse) { + if (location is Location) { + val start: DoubleArray = doubleArrayOf(simpleFeature.getLat(), simpleFeature.getLon()) + val dest: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) + getInitializedRouter().setLocation(start).setLocation(dest).setCallback(this).fetch() + } + } else { + if (location is Location) { + val start: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) + val dest: DoubleArray = doubleArrayOf(simpleFeature.getLat(), simpleFeature.getLon()) + getInitializedRouter().setLocation(start).setLocation(dest).setCallback(this).fetch() + } + } + } fun updateRoutePreview(destination: Feature?) { - val dest = SimpleFeature.fromFeature(destination) (findViewById(R.id.by_car) as RadioButton).setOnCheckedChangeListener { compoundButton, b -> if (b) { - val location = LocationServices.FusedLocationApi?.getLastLocation(); - if (location is Location) { - val start: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) - val dest: DoubleArray = doubleArrayOf(dest.getLat(), dest.getLon()) - getInitializedRouter().setDriving().setLocation(start).setCallback(this).setLocation(dest).fetch(); - } + type = Router.Type.DRIVING + route() (findViewById(R.id.routing_circle) as ImageButton).setImageResource(R.drawable.ic_start_car_normal) } } (findViewById(R.id.by_foot) as RadioButton).setOnCheckedChangeListener { compoundButton, b -> if (b) { - val location = LocationServices.FusedLocationApi?.getLastLocation(); - if (location is Location) { - val start: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) - val dest: DoubleArray = doubleArrayOf(dest.getLat(), dest.getLon()) - getInitializedRouter().setWalking().setLocation(start).setLocation(dest).setCallback(this).fetch(); - } + type = Router.Type.WALKING + route() (findViewById(R.id.routing_circle) as ImageButton).setImageResource(R.drawable.ic_start_walk_normal) } } (findViewById(R.id.by_bike) as RadioButton).setOnCheckedChangeListener { compoundButton, b -> if (b) { - val location = LocationServices.FusedLocationApi?.getLastLocation(); - if (location is Location) { - val start: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) - val dest: DoubleArray = doubleArrayOf(dest.getLat(), dest.getLon()) - getInitializedRouter().setBiking().setLocation(start).setLocation(dest).setCallback(this).fetch() - } + type = Router.Type.BIKING + route() (findViewById(R.id.routing_circle) as ImageButton).setImageResource(R.drawable.ic_start_bike_normal) } } @@ -541,21 +538,14 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback private fun reverse() { reverse = !reverse; (findViewById(R.id.route_preview) as RoutePreviewView).reverse = this.reverse - val simpleFeature = SimpleFeature.fromFeature(destination) - val location = LocationServices.FusedLocationApi?.getLastLocation(); if(reverse) { - if (location is Location) { - val start: DoubleArray = doubleArrayOf(simpleFeature.getLat(), simpleFeature.getLon()) - val dest: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) - getInitializedRouter().setLocation(start).setLocation(dest).setCallback(this).fetch() - } + findViewById(R.id.starting_location_icon).setVisibility(View.GONE) + findViewById(R.id.destination_location_icon).setVisibility(View.VISIBLE) } else { - if (location is Location) { - val start: DoubleArray = doubleArrayOf(location.getLatitude(), location.getLongitude()) - val dest: DoubleArray = doubleArrayOf(simpleFeature.getLat(), simpleFeature.getLon()) - getInitializedRouter().setLocation(start).setLocation(dest).setCallback(this).fetch() - } + findViewById(R.id.starting_location_icon).setVisibility(View.VISIBLE) + findViewById(R.id.destination_location_icon).setVisibility(View.GONE) } + route() } private fun initreverseButton() { @@ -563,14 +553,22 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback (findViewById(R.id.routing_circle) as ImageButton).setOnClickListener ({ val instructionStrings = ArrayList() + val instructionType= ArrayList() + val instructionDistance= ArrayList() for(instruction in route!!.getRouteInstructions() ) { instructionStrings.add(instruction.getHumanTurnInstruction()) + instructionType.add(instruction.turnInstruction) + instructionDistance.add(instruction.distance) } + val simpleFeature = SimpleFeature.fromFeature(destination) val intent = Intent(this, javaClass()) - intent.putExtra("instructions", instructionStrings) + intent.putExtra("instruction_strings", instructionStrings) + intent.putExtra("instruction_types", instructionType) + intent.putExtra("instruction_distances", instructionDistance) + intent.putExtra("destination", simpleFeature.toString()) + intent.putExtra("reverse", this.reverse) startActivityForResult(intent, requestCodeSearchResults) }) - } override fun onBackPressed() { @@ -587,7 +585,11 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback } private fun getInitializedRouter(): Router { - return Router().setApiKey(BuildConfig.VALHALLA_API_KEY); + when(type) { + Router.Type.DRIVING -> return Router().setApiKey(BuildConfig.VALHALLA_API_KEY).setDriving() + Router.Type.WALKING -> return Router().setApiKey(BuildConfig.VALHALLA_API_KEY).setWalking() + Router.Type.BIKING -> return Router().setApiKey(BuildConfig.VALHALLA_API_KEY).setBiking() + } } } diff --git a/app/src/main/res/drawable-hdpi/ic_route_gr_1.png b/app/src/main/res/drawable-hdpi/ic_route_gr_1.png new file mode 100644 index 0000000000000000000000000000000000000000..ac7ff8c0cc7f1bf93945660b5040ca654fbbba2e GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k1|%Oc%$NbBu6VjQhE&{2PLSwJ`1j|hO!G0r z;N^Z#U%q{7d+G9J<3t0?XZ9lea~4ZUNk#11y_;XbGVOs3Yv~y&oxX+p7k3o!{FP}v zYIuL5ETfPA{Fl!(bozes9#PET+pw^E@dj7n3GQnZ**;iiI2>5f>?UjSYC#}-uT{ns$Hjb7r59jA4dM(8i)L->3aZ!n2lO9< Mr>mdKI;Vst0BRy>hyVZp literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_route_gr_1.png b/app/src/main/res/drawable-mdpi/ic_route_gr_1.png new file mode 100644 index 0000000000000000000000000000000000000000..dbd5fda2ef0c3785499add1fe19cf1cefbaa0ba6 GIT binary patch literal 268 zcmV+n0rUQeP)hT;v1;Xp%^fQEkt;{PBF zvV>YbVFbE17-;BwApQq6{2vrk>=T&FL5BYY;<->C+ydgu6#E3I*$-;?51=8XKH1iLSwIN=!@|w&__pMx);w)a9>va^ zhu)-Evg@ThSF?V;J6-*?#g!hd)0-;Se$AVt^17LYqbb3j=kRxpE;)8q#mV|-`U5Hh z`I{Rx)bnTj*L^+t#OE45HFL%fk*4+?Do1R1?6%L?Zp@kdX?^|7?M9vJCU4j4oOW{m zRhdW8SGI?Gn)uYI(=C*?DOBBk-Jv@RTy}ux~d?Dw7ihm3E7HwBacqSv=*L(KquTy)L^E!we|ES2bKSbeJg!S+81{2@u zM>cHyxb^+-(~}uQ1ftbic-;2wKJQ%9*_)q`vhmhyrT~YW#s6FWWxmf>G<;Wi&ntGl zc7uoJ*06c9*(RI~Q35V=K-dijpO&L{}A`H~uv;Rz0vgF^%5hkj*WXhM?dbdR7 z(%AT0+hlW%Gjbm9SCH4;I*B2D&c4>L`R;3M7KJKY~9^S7Oa@JH@9iWW?!F%fQ5;(14d< k5^!K(WI-nsTc%9rxAiTQ`E{+d4H%>hp00i_>zopr03|ep-2eap literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_1.png b/app/src/main/res/drawable/ic_route_1.png new file mode 100644 index 0000000000000000000000000000000000000000..5f58a6d21faadabf3dd9c2b4e9843cd609a23f5d GIT binary patch literal 950 zcmV;n14;aeP)=3^Cx2ujMnRQfrQHlfB_hQ5da2Y08X5@pMO`} z+{x2VKR&*m1F%21B{yHpc%{n>`U69L0O0-MPPkd{a%8=<;$^~+e`y{+WpI?u9dHZj zQ(wWPyn3&=Ic-_xRMvqadcd7>^L5A7-?J*d0r2i{$J{I%)ZmI*A8S>_LkGC3eM}0g z*X7-N$Ex=^_*j)98oc|R7t{aK>VLzF@$QLcACn@uW5;1`+*-NZDt(o#^N(I+TL8R+ zcWVZ@XnKRZR%`Y#DXCtkcXzqoAnU00F)4s+{Cer|Zrx!swY+CDm$L1{1>DuUEmf@6 z$Ehp0vv+&=cz%$8xw7iM-tFk)GuhYS0Ok+;j+>i3z1!yFXRGf<_BnjO4c;xfdUuPD zOP7vP_&7xco5T3n>bvOU-7P-8u)2>^_?RMBuQ`0rtnNn!GV{GJ+2&(vA5%oQF7H0e z=~bvyseMe5;5K=;40#P#gO6iXaB%Nx^)W@L-e}&{=wk{DH-&dq`IrL2P2yc`J`P#I z$-Jw{#}ue~tJL1@;o~X`z~Z!-67P2L@hpUo$urz>;hySLX_~XJas7BRe=lwN_Ob5@ zHkE7N<-OK8>qf?OZFQeGjy@fL#bM`G_Y;4Rt3qjHY)@AAxlbRHC%7)}t{P5@w52Tm zzt!Z;$K(NSlXpw)b9Y=R9@Se8#k)OxTm}U!KdG7z%)4EDJQoJRDtJ0H@AmNVG$i1q_55}S-reHk z+bs-Q^Qz-M7vd(fljV@S+XA^}EtqPa$kOSCK~6sgUt1r1l*72GKmZtk5da2Y07d{9 zfB_f*U;suk1-xo_48WdJ3)ofR=Ld^Xg8!}rU;st{7=Qs788~2>g!eMLrp6yM`v+|9 z?7qy&STW#n4&%=0i^fsIV*ozn05AXpFap2;48RJ43+{n~3+@O2126z101Utfls^It Y0H*}S!h3i-6951J07*qoM6N<$f^*))ZU6uP literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_10.png b/app/src/main/res/drawable/ic_route_10.png new file mode 100644 index 0000000000000000000000000000000000000000..2079d5b927cc7a71147099affd7bc076ed6bf254 GIT binary patch literal 882 zcmV-&1C9KNP)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0{=-w zK~#9!?3_Pt+b|S|Nr6Gf_y%>BuF(zZ8^m2Z1(~wNIYHbL)Y&sQOV_3+XnF%>&E(u5 z9)k?-Bl3XOiUi35N%N7v2N3i>z{cl?Pa^q9z1eIO!fzBn0LXxh0AxVUDNJlX=+lqa zlDZMK^6~4zA_d4grdv1yJfZIQe=j{yn-c65AiD)!|3PbNrv&;APIedT+VewdKMDQ< zkljVenyAMGfv%{Hp$m7~u$g<&lIf!K5$!D;L7Y+dB?W!x*e8fs4>oI$8{U54tgZmr zzdmLJdI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w^z%(~hii^K*-bS6px0 zgAw~%{hg_w8$HbR#y{fA&Cjtt{O-f*T>PBE!+p~wLB>K6{!wr9Z@*&%<_`}OOF@Emw@Com)(bmZX z`azhV+dTY`T47sVt(M|vi5~U_S%ROXde|%Elzx`%Vc(sc($8W&>>Y9nKTG#;5Xc++ zJoOBCD&51uAjj~t77vH)!T(XCwLH6NitsagFc^f}#_HcB_L;S4W!zns>h@Vw^I0@tdepc<_WRSc3yx}$K zJe(AAho8Hm&cmrYxy{dQQR(62kZXRv-|)11tsWKuxzd1nds?(gvX50|1$l#?ReM-c zClly9d-K(ff3@kqJZ}KmA80zV`_77>@xx@40{=0`Pu%ZMu7CeCzVBizx&UMZkO3J1 zWY1Z(+y`WjDQoNe66<8>0+10v24p}+!sWjJ0|3nUfXH@Q)%5@X002ovPDHLkV1f;X B#3ld$ literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_14.png b/app/src/main/res/drawable/ic_route_14.png new file mode 100644 index 0000000000000000000000000000000000000000..bab9d3f60e1508728954defb450a02044247f0b2 GIT binary patch literal 1044 zcmV+v1nc{WP)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1EEPo zK~#9!?47@k+CUJ80TEpj>8`luDoB$S-T=P=u2cC9!UIGKc>|&}>2g(SQ>6?%L5?!1 zxH>70Ce1}6v(lX8Te1Gf?t0e#jkGeh!Pwt@jCXbs*FPSQJ%ron12P~3G6Imh1NrsW z$A}iU)Hc7~yhs4qK41m)OJ>t60=@4VbgEtyX5w%Ns}XO{XnVWE^xq8TBvKd$ZUSuB;>eF78BqlEq+iNRekLckW1OCdPfsc zH$FbGOKtNeV0$O$9LJT(`W<&o`S_tF_8v|M)JRT_LbbTS-YvCh<0jKdj!&Fm8UWle z+dDJZyQEL!il5tfPS$UDJLy#(L0fRwY-Y0e39yu$9EDNj_iV4X`^C`GMX5XXsOg(t8GE_! z>vbGu=*VL4RbF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MldH7EH6PJ8^cOm_(JXLX%hnGbL;o}VE zXXOEKZXS;AXEhLTb{NLS7 VoLgCw<`Vz_002ovPDHLkV1l~4tb+gm literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_18.png b/app/src/main/res/drawable/ic_route_18.png new file mode 100644 index 0000000000000000000000000000000000000000..40e89482f12993f9b3b5590b2b3616c93dc1d21b GIT binary patch literal 1127 zcmV-t1ep7YP)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1N2Em zK~#9!?43Vv(?Ar!FToXvCEXb5z@IUOFMv@dCc?@THa7AR!oW=W1yHge#6mj27LiPh zq$^W0cBmAqLxBpJcl3&kx$B+nyR*;to^*2BSa$l$FVFYxHAyQ;5`tkiS_l~-BV-JO z>>uPiZ_jpN6FSOi`|at@${6JNd_I89nEg2H^?H+nfEO^j4U_Z?MjxJlPnYe~RyYs^ z++kx}@WF%)1WaQG#v9pADv&#Z+j(N$;FNn^wnJd!QNYV-4JqRZO*algq>S!e0`o^L zAT!W2*vwp_3u5$PGm+T(u{Mw$gS*S%K33RWDoz`b{s%aM%}N0HNbm|plXKWRg7HGI z%RY>&FrKG=cc5}?H2Gh9d4M-C9)hv-qWvgus_@=q1$(Kf0|2~*efQw@&CLA^geyu1*21~+7Ix{CIu)5?P)slqFh znY~{HfJOF-EZ*c|5rTu~|v6se6fIBL2iilI?ZM}i4VDF$zhndBoXqD$QWQ7Iwvi7FW(=B_^a}IK< z9c0p8EmfX#kZswkdsg8LWQn~SX79qlsiVe2R9n{!fVLQk&aDrS!XlT`lKSjZ}HLAs_#`MqVA?{{xy6bV0rEn7ty4V-tUe z6!MqT8|2-|ZSphW&h~7zgPbcsazTE7aw`GAEsnib+Cfc#EGP2UP$7 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_19.png b/app/src/main/res/drawable/ic_route_19.png new file mode 100644 index 0000000000000000000000000000000000000000..7bc73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mV?d00001 diff --git a/app/src/main/res/drawable/ic_route_2.png b/app/src/main/res/drawable/ic_route_2.png new file mode 100644 index 0000000000000000000000000000000000000000..6fb3a3881ed0237e3173573f5f80abad1a7ac1bc GIT binary patch literal 843 zcmV-R1GM~!P)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?0@z7J zK~#9!?3_DN!!Q&@EsrRmAv=JI7Vm)UfYdZ(2ZR*>DJnO)ptW&BQ`T8I816F_#;(=a!}1Iy_rYHb2N0%SL^ zjY7^Wr(U_Ddw}c)bd#%Ej6RgaIX-FnP?9H7rRYORpRJal50%1_fCc(^q1KA250%oo zixPd9oD%3RAp6(HfNzRH^^x3oG65WBv*FQ!<@8}T8__FJ$?mGULx;=Q`cSE_h2yF< z`q+u3kL0JHxK~lc)Q76ms?J#YP<2~68$%zpo2_0_A5Bzp7=2vu>(!Rq43VgkE(9dp*!c1d}VzAvRxm&Y&I+IL?2iSXV-_(L*JD?P{{%G0muRL z0bK;phhFhtq? z8Y$$hY&IOdi{*M44OZXroI-2y+~WUke2BX)93TgH7y)DtdI01AdI01AdI044dN9>{ z=t2*GY}bR==_g%tz(FQbHT3W&W<7Iz9X-?@a*V|-8hZGOw`E!ydhq|cLtYa-jOG9~ zdMJFqPokj*|IyHc|Kte*Zqi{KQx8d3a#de3(+TOJvM)>K3F*NGxF16gNma6x7ua=z zdZ^r140(cjXjW~j91T4HvPeCM(*{C$V2&Wyq~8kxiyB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1M^8l zK~#9!?43Vv6EPIPop2S1CEXb5z@IS(Uw}iIm?e7eL8^5DV!5TSPK3 zlB`V0*r8HR9ST(Fc&08o9X9se**^R3J;}PXO>^llzdZZ-HAyQ;5`tki+K2!lBV-JO z>`Vl6Rs{pFTybupjM2XGj(FNeKeZ&DEO0!FuHlAgop!vpZC zY`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tlGSn~ z+g-!1LY5DHqpGSkVfDIpm$g=VCEs|d>aWP(%V>95X|;)~I-|NECt%MstPZ*i*{|b; zx2cKi8F;g?$?DIr)mF5-OkD)th|SWmf&Wb_o4BSR$93oBl(O8)CT>+G51Km1pxML? z>$KW4Ws#yPYb+0HSbdMx*zPjid}EQS`s=<+}-6(w)}IhQIl0R`>bWL z&g!Gz8*F!ZgMB=?*eGNxt3Q)gpRD@q#kZ?kpuMVI9LssJcnhrd<@dzDhwRn&%d4hL z?nKIvKr7o_KUZgZO+pUk>aPnIcZ+sc<5ReQTVBdz3o-L>E~@^bC!U8-&&m`ufDFihj4&F11sDLRyzL$QYMyxj0000< KMNUMnLSTYn1sV+i literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_22.png b/app/src/main/res/drawable/ic_route_22.png new file mode 100644 index 0000000000000000000000000000000000000000..dfbd56ccc010686eb2308cd8c4f1df74619c39d4 GIT binary patch literal 915 zcmV;E18n?>P)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?10YF6 zK~#9!?43XzPs^aOa_4Zc7na{}N51hGe9({(rjT(8#!5;g<`fDFh8AOrF~(o@8_swzkn-V+;RIL?N0jCr_A9xnPDFAV#)2J@zILgge&?FDtUYs7Qlt{ zEuf3>ReZ^dlb#_bG6uRB2zbhi$2SiD!rJ(ON_O|KiwYL94j_B*a97m&nUq$s&BOPW zq4zoXS)G$RJp7Ye+yC3>KjhYW_*k=_Nf}_9hudr6+IB50eYK2H>t}7cuz9#)n9p4+ z$Y+gaKa-*=wtDz2^Aj>gt)EE=;MTVn77sTLn`va7&0NT~_ZzaShkL47t)Dei^4!(K z1N=PSTgY5tEs)b89(MHesqAaNAoEFo=Eb$q{o?51K0m)0eb=(j{eavvFH!lJ84c`QDdo^C7jLDKg+L57z;ATc`Fj zMFbqw!1isO@5|;Ra~d` z@Bly8*+3S@&6If9#m}=4ex?9`4+{JAWv%I%wT=1b&HSGh_3h^nmE2aadH48At=sxr5XYvTx=HXSxC6l&P#p~Nv-uz6S0C#z~ z(*Epl&-Jr6Kl`fWY&@L8&*Y(sv-5ClKhsFSIeR#opJ@c(tUVml&tob%dk@F*GYzcb zYF9iwz|U21$h?zD@p{H8cMrSxc`gisR`PV$JUqb9)6kHY#`~LH@bDHt-)v#fn<0N& z{Vc9(ceLCk5BGp>SP^YiPoz2BbSQKBc^p2`wQ=%g4#$n3VgO`7MgSR*0T}^gKt=!= zkO3J1WIzUF1dst40c1c1WCV}_83ANK24n<~0U3}HKnCQvS#`VyWRGbC?yB(fONdcY p;y+8Gk^vb3WIzUF#B2TuFaR$dcJ^G!*o6Q9002ovPDHLkV1hOxvuFSS literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_23.png b/app/src/main/res/drawable/ic_route_23.png new file mode 100644 index 0000000000000000000000000000000000000000..bf61886582c3525ad89c3065d51415ab673c0e97 GIT binary patch literal 1173 zcmV;G1Zw+yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1R_a9 zK~#9!?47%E(?Ar46^$qv%oD^kv@tJ0!V@Gl4QA*;1vOEg05L<4(@;CZ17J6_C>1j_ zC~pwe6lRw>o^eiA*S%)30;(UrEWqX0r(pb|VA=Kn7$4AOrH4A{x_| zefst9M7$)Torv~Gv~Ry(K6q<;y9Z+!!V%n<+9USs7XtJO=|T^%1e=R?t^h3K4C$gf z+&QI&!5_!!)oXmV8W zy#nxBwCAEt+2_Ap=H+mJaHpaz#M_@WaOKcUs{9QbRTQFqX8li4_y{hgg;y2bB-~^> z?xkgTf0?&`xKy(Dg>T2Dy{qVULvR;t*`;_nWh$PEez)Rx8&}0I@*HlNORI#tQxH$t z$FlG3j_QwH6u)Soa0>#KR;()F2ZZ&{6p)vD54nMnC@80_`AXN;hN{xiZsN~MsP;;;{W>&1^ z<;VftRxV8=62*`&saeKJ@v~C+NL6VKTxlfcCNBNZ!TiHMz7Xq98Z65JJZ@TKdr`8k zOVd=bYRK0lRK;)Q9poP2Zj0%?NuU;L0+jEY0{d;wgHoU zK2n&GRzdrDV^hsqN)|gfp;Pw%9E8m)z72BmT4OkvF{fy>_-T(W=!>l!!j&pc6!tmM zSY^iCs8J;k@j_~uebzb9E1T(Jh_?j99qe=K;x}5zWS`IZNJh67sEQxeno%lQWuFs6 z>$Wyt4hN=U9s3N(4Pv2~3rP*Ge>G~zW%k*y;o(X?8k>@N-n}tB*<`c$g#%FWT%qFF z(&lm-DI*-9ilu#CTH4lXbdYH()uesyWrPuW3|Ms!#g*m9!K@TNpOvh#&#}!7l5;Ff z7r)SB6}P>I!rPSLtCG{;{v!y9qiyqaG~GMM74|uIvj8~{`O00000NkvXXu0mjfB4!%Y literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_24.png b/app/src/main/res/drawable/ic_route_24.png new file mode 100644 index 0000000000000000000000000000000000000000..8e9dea7d634c693779e166440dd8f1af2b86f7b1 GIT binary patch literal 1199 zcmV;g1W@~lP)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1UyMZ zK~#9!?42=k(?Ar4Z4WR*Wpjeq4Gl#M9Kg;Eprwg(g6IaA84h4BK%9maZV;tsCN?Dv z_HY2~iXugL3s0H#vMaBpU1=r#Z|02?NwZpgdV25uisZEK?(SMJzt#Z)Kn7$OAOmuf z>_HJbdHU(LM<3tFZ^?g}UMh>P$)`<#?Hw{l@voFk1nddH zULhxEx8a`kBauSrWX#F?fSk?7mfM}y6?PGj4+WOMo^q-I0Uh z@^Q+#$K)T$-;r-M>$@^+bQk*0LgeEsY0;W|&fsJlkZ;H%_O4;bHMf0pM6x+mEXZe? zs1@Kg-O)S$|@Z+1xwNS-hmF$Ka&8H^`czx21#c zDch_#8WUU6HbaYXr+Z*uGVE2|(}k|+siqdM<9!89L@BudeZr9&ym~AWa;yWU0cF(> zOR!&S^1BLqR;HjSJCb!!j|fO)yAuNag-)_8_5X}gWS&Df-&sKLOp)=p&orf9vuo< zlGf^_J$E%JOQ}9`E!CZO7hLpi(v+S>cVI2I9jMZM>M{2pdOIPc3Qc#g&LU7UM7E83 z936TL!9$jc;Ld^iDoPsIIziLTlRAQgEL5B(vSz;fS%z&=kHe54j~qm@Np2S+9z@EL zV4tyC&3uxb7CueU6BBOd7%x^%T4uRjrgc20itC)?O5|m z6{FcDK^2&!2qmQMsc-{!ehN2gHnsZc^+%7wk)hJ$iysr>zifYgg ziu;1R@I3GTqB&%_?F#a^NXXoOS4M7EHIj9mMzA-Ja^LFIy$qS>_U3{67QOSivUm{M zijZW~{XsBKj)l_NytS;$7y(CL(oiz7K9@PbM*+s7smKU-rV`Ct74_St~MkITH z%ulgDZ~c4CYgn}>dy2B$Us=X?#1O%r#Rv?L0U3~CfDFhmKn7$$h5<4l12PPd0T~9! zfDFhmKnCP8Y-{)#kR4j`wP)K_Ko5ks@t-9T$$$(4WIzUFm{a>BzyPTd=zbH6a)AH< N002ovPDHLkV1hP%CTIWv literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_25.png b/app/src/main/res/drawable/ic_route_25.png new file mode 100644 index 0000000000000000000000000000000000000000..c4dc56203051462bf8f3302746a16b5f5df86954 GIT binary patch literal 1144 zcmV-;1c&>HP)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1O-V% zK~#9!?43<+(?Ar*oe>~a2qkcVMl9IIHz=GSX3M5ILVALv8@3G+2WU5JAtz{af~Ff5 ztilbN6%rtYH}n;`lkvyc^YO;KCs|3y&e-|&@1I?NwYS^t5-ztT7y(0O$Xxa6Q7jAk z>eH_wyu5{B48szJ&)?oX-o&u%y%;up2>2@u2f5}g3~3CYW6{MI1+c6>wzHEhq<9W5 zqk_>R9M8IF0r)k%T-KQM4QS(vA)5mpz{>`;P*u{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9jr>a zzne4kt9BnMg7xh@WkTjQ@RBga@-jmz=!5Cvw3tg6X@|OIbC#9p^D4q|O+n1cNAnFI ziH{Lflp_r?W@e(zQ<3U6*#Fya`??M7uQ2_Bta@_MA>5IkdEq@9!k=G-?RaHDE(pg4 zQzye?07MpYUN~+kglu~BO>XVN_8X0$OOR8lDq{FtmS9FwDo1h{fSF3bDntvZ8bF@G zq#=xYLSmHlnAW`3P!9kqcXZQ2w4o%zz?fak>|$XqOplOGrt%(ri!9`p?AUaO#K?#X zWbr}HsIbenbwIm*aWEnB;^crIup@+n(#o7d+%LUA6p2#jpbM=h zJ~v{hDs^gKvTDK04cK^9D z)xOT+wEScn%|kDw0_Z9xMuDaH8D`DDJU6<_*0*>pq~gN_vLyh`h+AmJqlf~4%*&A!+q8Uu9(u#!rMWlzx+|ksUo1_X z@2re@tzBLQ$kNsrBfWL@_l7z1d1d6pzbj)$KP+$Dv1n!d7T@;+WHS+v1!q|GiXLu$ zI>erQ-O2p+cs%vZ8c+A$cfO77wTE5+SZeJ=i=sVl{^NFTcF=jl06skW@y+oK^Tz?O z_{G&_Kc6-$BRqVA#%l}v5%#LZ0?Wt9<#10;ygxSg>-GcpKkqr<5R*4#KU8Jp-{m~ah;jJO_WmhiNYwySk&K=8YZW9QKXn#> zr3ReqR4X~j3q^@F7a^$Z5E~mRIud8d7130v>PRdhW93dva%u!Q+)>fB&s6F1eqX{2r@xVl)eiv0PXaE;ngL@ssI2007*qoM6N<$ Eg2JDg9RL6T literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_27.png b/app/src/main/res/drawable/ic_route_27.png new file mode 100644 index 0000000000000000000000000000000000000000..2b978ab2de067b2ae59fb07675f59302023e6e27 GIT binary patch literal 1670 zcmV;126_33P)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1`|m{ zK~#9!?44bR8&wp?C);G(uF8g5bQfzkYpWtcH}+xa(`HI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unvYeMUS~9P&(|2ikt<@SIxN!@C7HXAOAssa;eM)6E z1Ua%Co<8J*_b4jgK6oI*^4NW_1Q9H)7lK3&3l2I-u(3cMPMtZ63&f>WR^dD6E)?De z)9nt1*xqPBj;S+e^9-5r+Tb8-%Et`_Z=uoYY}qVev6hG8y|@MBVJYxF)-Wmdl3;>8 zq)Du*dV~AoBh?M8f|Dpr=EGem8obh!kL=m(!r~xIM%#Sz9Cq7^_k;o-d-8&MM@Cv4+<==WVx^{Tw3_X1u*D3CJ4q@h^G4n2^M! z6XdC_l32-Bt0nUB7Lk)CGQb4_@Z8qhNm>#BC9}T*dw1<`?)68r}=?dza$%|n!M1h?EV3w6D zAT($GF<;Go8CW*>=ydDDJ6TjFD*}?5kD>%_)CNNCd(VBtwvNqx{1#CZkWDjl2=i}3 z%7#EDyzP!XN-PfyENLPLJdn_`!OH~kArnzR26?zaZh*y$xynQkkUh$S$Z8}=S=f}{LeLRZCcMgp zqN>PB9u#>6K1eYd;?Uo3F6W5KWEifkZ+Vc&2D=ttV0a=}4afRB79^Z163DEXtWl~} zh5UVDq;!>lBrPohqM$iz+gdnP(P0&O5mewANOR8u55+k*;ax5i@-T-D=!&Q5J z{H8s~!-C)iDs!K|m>oc$w}s$0vD`IdkQJ%PGIdRa#-zp=KEc3`S)HVki)n`PAPc+s z`nwZk1lF<3zf??q%uyaJ{O7GDDg9DymSmd|x0}6Zxv^JZtgk)7;B~6nx`X_;L`ZHT zX_e@~{_iL7ihhHaNedSb`X6jTsa2PvmhRPnoQn-04o|DkNqdW05{=2v!xz~ QH2?qr07*qoM6N<$f@-3mK>z>% literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_6.png b/app/src/main/res/drawable/ic_route_6.png new file mode 100644 index 0000000000000000000000000000000000000000..3188ed624c5ee29af627bf0502804b7ebb9fcfa3 GIT binary patch literal 2012 zcmV<22P622P)yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?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ks@^U zUU2KY9XF-#R&R|LKS||{QW*lsfQ$e#AOkW2$bgIhG9Uvoas-g8n)`t4FeSsSvi@HS zjuQM3VtQ&&YGO)d;mK4R1_ovgPZ!6Kid%2y+UDJM5O7=R z802o*7`n7HFX1VRTFf#-eSrqM#<#)|ZTbr4n#@00`tl!aS@}d*WmT}o=7S=qsysWd z{5#WipItzEt;V}gi9Z}BY_W-2f1OpxjD@9v=LClW^QQ@))Rv#D`|)e}qi25i>VE$G z`PQbrvcJf(HTi(5`Ta9S!xoE4|eKJHsxpOjm}o?wO>}fyAk zu-EClQ*GYAdMH;nk6+9vdcGf|JGu`9!zLx)%W@o8jK z|G2@-zJ1-36uE0p(zzmzhGy}9|4=-YH>L27PiOn?AC+Q<&WkX7*ijI_Z;gqq@W#Tw zmB#<|x_^Bu?(i}b&AD&8@7j-&{xdIcy|OElX{}P|zI<-&JN0`rS36~<@KC^LJ`;&)a7fiJeg?x3H=4USJ zX8G5K@BNEgw|)lleLm)I$Y7+P3`~0sJ;)4ZBPNIlDg&HEi|(wEieuh%{0dWf=#QVO uM>HfK+IugW#3;#_;=q=2B>Nwi0YhAQUEF&;J`-TZV(@hJb6Mw<&;$Uh6{pew literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/ic_route_9.png b/app/src/main/res/drawable/ic_route_9.png new file mode 100644 index 0000000000000000000000000000000000000000..a7a15ec0af6dba45ad807b7bacc0ebfa3b30189d GIT binary patch literal 1116 zcmV-i1f%yB600009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1L;Xb zK~#9!?43Vv(?A%;9b+UUKxJcKNQMdqhL}%~pnQO4W&nQ!!Y3d|j0|OB4GTg{$;J{$ zCPtFAEa^8$REeT8n7isK1=r_0pYQeG=aEiL8pn2je*C`o-rF{aPxJXaU|){K)6rlsn3x>s;itcRA1_PHVwqywTWs88^+_s0PdF@FjvpuJ&)K}vC&D|$ko`eIjg92OlE-jg3U?-n7h}v0GR8@24t^B?&W%A3GP*u=R~T!MXjBz zaPOLpC$<3F3>B4dvW9!#Ft}raLuV?bD+5{4%v_6^!;0XznXA0gL)K^qQMp$ZDrRY` zyi!9h%DoE6i!3|yD&*dz1$Emwpld5slm@cGy|Q)?m7)o6ouOhZ93DhD}ZGc)f{v9pn6y%M>XFX{~Qb}v*A7a9AN5p5M?#`-_Juay;MT} zaem+Ve0Jzugg2ZTxmV`m8O1@AkiVQAh7544F7C}cRA@o|a~*Ki-MgQ_+tf+VXm-Ki z`c6GWTIG?hT~tWX6}Ac0ff@^$xppE#AJ<1p$W8wP_JBK@dR?W_kn>93_ + android:layout_height="match_parent" + android:orientation="vertical"> + + + + + + android:layout_height="match_parent" + android:background="@color/transparent_white" + android:layout_below="@+id/instruction_route_header"/> - + diff --git a/app/src/main/res/layout/direction_list_item.xml b/app/src/main/res/layout/direction_list_item.xml new file mode 100644 index 00000000..42d145e0 --- /dev/null +++ b/app/src/main/res/layout/direction_list_item.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + diff --git a/app/src/main/res/layout/list_header_divider.xml b/app/src/main/res/layout/list_header_divider.xml new file mode 100644 index 00000000..5ffebbbf --- /dev/null +++ b/app/src/main/res/layout/list_header_divider.xml @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/app/src/main/res/layout/route_header.xml b/app/src/main/res/layout/route_header.xml index c2019822..164ba620 100644 --- a/app/src/main/res/layout/route_header.xml +++ b/app/src/main/res/layout/route_header.xml @@ -94,7 +94,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginLeft="4dp" - android:src="@drawable/ic_pin_outline" + android:src="@drawable/ic_locate" android:visibility="gone" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + From 0e588346af20af06e3f4382966735edf695cf08b Mon Sep 17 00:00:00 2001 From: kingofirony Date: Wed, 24 Jun 2015 13:02:55 -0400 Subject: [PATCH 3/8] adds resources --- app/src/main/res/drawable/ic_route_0.png | Bin 0 -> 253 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/src/main/res/drawable/ic_route_0.png diff --git a/app/src/main/res/drawable/ic_route_0.png b/app/src/main/res/drawable/ic_route_0.png new file mode 100644 index 0000000000000000000000000000000000000000..9dba9a923b08be2e1c4e91826b3bf6bc72013ae5 GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^kw6^5!3HGfg-3%VI14-?iy0WWg+Z8+Vb&Z8prB-l zYeY$Kep*R+Vo@rCV@iHfs)A>3VtQ&&YGO)d;mK4RprS5M7srr_TW>BHGBPl5Fe_}W ze?Buw-X&o&PwaAsO(`ng(|S@)dQ8)iJUK~KInrp7s<#_VbkamrQJ^xQTDT}k8Bi@; r6r@=>5+MrGJW&U1WY~r8Ogs$5XPMXXFMa<2=qd(JS3j3^P6 Date: Wed, 24 Jun 2015 17:10:46 -0400 Subject: [PATCH 4/8] adds tests for listview --- .../com/mapzen/erasermap/view/MainActivity.kt | 2 +- .../presenter/MainPresenterTest.java | 1 - .../view/InstructionListActivityTest.java | 154 ++++++++++++++++++ .../erasermap/view/MainActivityTest.java | 37 +++++ .../erasermap/view/RoutePreviewViewTest.java | 1 + 5 files changed, 193 insertions(+), 2 deletions(-) create mode 100644 app/src/test/java/com/mapzen/erasermap/view/InstructionListActivityTest.java diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt index 0efed001..82971ce9 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt @@ -68,7 +68,6 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback public val requestCodeSearchResults: Int = 0x01 - private var reverse = false; private var route: Route? = null; var locationClient: LostApiClient? = null @Inject set @@ -92,6 +91,7 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback var path: PathLayer? = null var markers: ItemizedLayer? = null var type : Router.Type = Router.Type.DRIVING + var reverse : Boolean = false; override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/app/src/test/java/com/mapzen/erasermap/presenter/MainPresenterTest.java b/app/src/test/java/com/mapzen/erasermap/presenter/MainPresenterTest.java index b51cd43e..90d5cb35 100644 --- a/app/src/test/java/com/mapzen/erasermap/presenter/MainPresenterTest.java +++ b/app/src/test/java/com/mapzen/erasermap/presenter/MainPresenterTest.java @@ -138,7 +138,6 @@ public void onBackPressed_shouldHideRoutePreview() throws Exception { presenter.onRoutePreviewEvent(new RoutePreviewEvent(getTestFeature())); presenter.onBackPressed(); assertThat(controller.isRoutePreviewVisible).isFalse(); - } private class TestViewController implements ViewController { diff --git a/app/src/test/java/com/mapzen/erasermap/view/InstructionListActivityTest.java b/app/src/test/java/com/mapzen/erasermap/view/InstructionListActivityTest.java new file mode 100644 index 00000000..b24b4baf --- /dev/null +++ b/app/src/test/java/com/mapzen/erasermap/view/InstructionListActivityTest.java @@ -0,0 +1,154 @@ +package com.mapzen.erasermap.view; + +import android.content.Intent; +import android.os.Bundle; +import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.ListView; +import android.widget.TextView; + +import com.mapzen.erasermap.BuildConfig; +import com.mapzen.erasermap.PrivateMapsTestRunner; +import com.mapzen.erasermap.R; +import com.mapzen.pelias.SimpleFeature; +import com.mapzen.valhalla.Route; + +import org.jetbrains.annotations.NotNull; +import org.json.JSONException; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.Robolectric; +import org.robolectric.annotation.Config; +import org.robolectric.fakes.RoboMenuItem; +import org.robolectric.shadows.ShadowActivity; +import org.robolectric.shadows.ShadowIntent; + +import java.io.IOException; + +import static com.mapzen.erasermap.dummy.TestHelper.getFixture; +import static com.mapzen.erasermap.dummy.TestHelper.getTestFeature; +import static org.assertj.core.api.Assertions.assertThat; +import static org.robolectric.Shadows.shadowOf; + +@RunWith(PrivateMapsTestRunner.class) +@Config(constants = BuildConfig.class, emulateSdk = 21) +public class InstructionListActivityTest { + private MainActivity startActivity; + private InstructionListActivity activity; + + @Before + public void setUp() throws Exception { + startActivity = Robolectric.setupActivity(MainActivity.class); + startActivity.showRoutePreview(getTestFeature()); + startActivity.success(new Route(getFixture("valhalla_route"))); + startActivity.findViewById(R.id.routing_circle).performClick(); + ShadowActivity shadowActivity = shadowOf(startActivity); + Intent startedIntent = shadowActivity.getNextStartedActivity(); + activity = Robolectric.buildActivity(InstructionListActivity.class) + .withIntent(startedIntent).create().get(); + } + + public void setActivityToReverse() throws IOException, JSONException { + startActivity.setReverse(true); + startActivity.showRoutePreview(getTestFeature()); + try { + startActivity.success(new Route(getFixture("valhalla_route"))); + } catch (JSONException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + startActivity.findViewById(R.id.routing_circle).performClick(); + ShadowActivity shadowActivity = shadowOf(startActivity); + Intent startedIntent = shadowActivity.getNextStartedActivity(); + activity = Robolectric.buildActivity(InstructionListActivity.class) + .withIntent(startedIntent).create().get(); + } + + @Test + public void shouldNotBeNull() throws Exception { + assertThat(activity).isNotNull(); + } + + @Test + public void shouldHaveListView() throws Exception { + assertThat(activity.findViewById(R.id.instruction_list_view)).isNotNull(); + } + + @Test + public void onDirectionListOpen_ShouldHaveOriginSet() throws Exception { + assertThat(((TextView)activity.findViewById(R.id.destination)).getText()) + .isEqualTo( SimpleFeature.fromFeature(startActivity.getDestination()).toString()); + assertThat(((TextView)activity.findViewById(R.id.starting_point)).getText()) + .isEqualTo(activity.getString(R.string.current_location)); + } + + @Test + public void onDirectionListOpenReversed_ShouldHaveOriginSet() throws Exception { + setActivityToReverse(); + assertThat(((TextView) activity.findViewById(R.id.starting_point)).getText()) + .isEqualTo(SimpleFeature.fromFeature(startActivity.getDestination()).toString()); + assertThat(((TextView)activity.findViewById(R.id.destination)).getText()) + .isEqualTo(activity.getString(R.string.current_location)); + } + + @Test + public void onDirectionListOpen_ShouldHaveCurrentLocationFirst() throws Exception { + View view = ((ListView) activity.findViewById(R.id.instruction_list_view)).getAdapter() + .getView(0, activity.findViewById(R.id.instruction_list_view), + getGenericViewGroup()); + + ImageView icon = (ImageView) view.findViewById(R.id.icon); + TextView instruction = (TextView) view.findViewById(R.id.simple_instruction); + TextView distance = (TextView) view.findViewById(R.id.distance); + + assertThat(icon.getDrawable()).isEqualTo(activity.getDrawable(R.drawable.ic_locate)); + assertThat(instruction.getText()).isEqualTo("Current Location"); + assertThat(distance.getText()).isEqualTo(""); + } + + @Test + public void onDirectionListOpen_ShouldHaveFirstInstructionFirst() throws Exception { + View view = ((ListView) activity.findViewById(R.id.instruction_list_view)).getAdapter() + .getView(1, activity.findViewById(R.id.instruction_list_view), + getGenericViewGroup()); + + ImageView icon = (ImageView) view.findViewById(R.id.icon); + TextView instruction = (TextView) view.findViewById(R.id.simple_instruction); + TextView distance = (TextView) view.findViewById(R.id.distance); + + assertThat(icon.getDrawable()).isEqualTo(activity.getDrawable(R.drawable.ic_route_1)); + assertThat(instruction.getText()).contains("Go north on Adalbertstraße."); + assertThat(distance.getText()).isEqualTo("0.2 mi"); + } + + @Test + public void onDirectionListOpen_shouldHaveLastInstructionLast() throws Exception { + int pos = ((ListView) activity.findViewById(R.id.instruction_list_view)).getAdapter() + .getCount() - 1; + View view = ((ListView) activity.findViewById(R.id.instruction_list_view)).getAdapter() + .getView(pos, activity.findViewById(R.id.instruction_list_view), + getGenericViewGroup()); + + ImageView icon = (ImageView) view.findViewById(R.id.icon); + TextView instruction = (TextView) view.findViewById(R.id.simple_instruction); + TextView distance = (TextView) view.findViewById(R.id.distance); + + assertThat(icon.getDrawable()).isEqualTo(activity.getDrawable(R.drawable.ic_route_4)); + assertThat(instruction.getText()).contains("You have arrived at your destination."); + assertThat(distance.getText()).isEqualTo(""); + } + + @NotNull + private ViewGroup getGenericViewGroup() { + return new ViewGroup(activity.getApplicationContext()) { + @Override + protected void onLayout(boolean changed, int l, int t, int r, int b) { + + } + }; + } +} diff --git a/app/src/test/java/com/mapzen/erasermap/view/MainActivityTest.java b/app/src/test/java/com/mapzen/erasermap/view/MainActivityTest.java index 711ee66e..79470744 100644 --- a/app/src/test/java/com/mapzen/erasermap/view/MainActivityTest.java +++ b/app/src/test/java/com/mapzen/erasermap/view/MainActivityTest.java @@ -27,15 +27,19 @@ import org.robolectric.Robolectric; import org.robolectric.annotation.Config; import org.robolectric.fakes.RoboMenu; +import org.robolectric.shadows.ShadowActivity; +import org.robolectric.shadows.ShadowIntent; import org.robolectric.shadows.ShadowLocationManager; import org.robolectric.util.ReflectionHelpers; +import android.content.Intent; import android.content.SharedPreferences; import android.location.Location; import android.location.LocationManager; import android.preference.PreferenceManager; import android.support.v7.widget.SearchView; import android.view.Menu; +import android.view.View; import java.util.ArrayList; import static android.content.Context.LOCATION_SERVICE; @@ -379,6 +383,39 @@ public void onBack_shouldHideDrawnRoute() throws Exception { assertThat(activity.getMapController().getMap().layers().contains(activity.getPath())).isFalse(); } + @Test + public void onRadioClick_ShouldChangeType() throws Exception { + activity.showRoutePreview(getTestFeature()); + activity.success(new Route(getFixture("valhalla_route"))); + activity.findViewById(R.id.route_preview).findViewById(R.id.by_bike).performClick(); + assertThat(activity.getType()).isEqualTo(Router.Type.BIKING); + activity.findViewById(R.id.route_preview).findViewById(R.id.by_foot).performClick(); + assertThat(activity.getType()).isEqualTo(Router.Type.WALKING); + activity.findViewById(R.id.route_preview).findViewById(R.id.by_car).performClick(); + assertThat(activity.getType()).isEqualTo(Router.Type.DRIVING); + } + + @Test + public void onReverseClick_ShouldSetReverse() throws Exception { + activity.showRoutePreview(getTestFeature()); + activity.success(new Route(getFixture("valhalla_route"))); + assertThat(activity.getReverse()).isFalse(); + activity.findViewById(R.id.route_preview).findViewById(R.id.route_reverse).performClick(); + assertThat(activity.getReverse()).isTrue(); + } + + @Test + public void onRoutingCircleClick_ShouldOpenDirectionListActivity() throws Exception { + activity.showRoutePreview(getTestFeature()); + activity.success(new Route(getFixture("valhalla_route"))); + assertThat(activity.findViewById(R.id.instruction_list_view)).isNull(); + activity.findViewById(R.id.routing_circle).performClick(); + ShadowActivity shadowActivity = shadowOf(activity); + Intent startedIntent = shadowActivity.getNextStartedActivity(); + ShadowIntent shadowIntent = shadowOf(startedIntent); + assertThat(shadowIntent.getComponent().getClassName()).contains("InstructionListActivity"); + } + @Test public void success_shouldAddMarkerLayer() throws Exception { activity.showRoutePreview(getTestFeature()); diff --git a/app/src/test/java/com/mapzen/erasermap/view/RoutePreviewViewTest.java b/app/src/test/java/com/mapzen/erasermap/view/RoutePreviewViewTest.java index f0ecc426..bba6d118 100644 --- a/app/src/test/java/com/mapzen/erasermap/view/RoutePreviewViewTest.java +++ b/app/src/test/java/com/mapzen/erasermap/view/RoutePreviewViewTest.java @@ -13,6 +13,7 @@ import org.junit.runner.RunWith; import org.robolectric.annotation.Config; +import android.view.View; import android.widget.TextView; import static com.mapzen.erasermap.dummy.TestHelper.getTestSimpleFeature; From 58edb14ae4e9a36a63440147e607d414896a488b Mon Sep 17 00:00:00 2001 From: kingofirony Date: Thu, 25 Jun 2015 10:40:05 -0400 Subject: [PATCH 5/8] changes on the road version --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 4d5191d9..b4875942 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -67,7 +67,7 @@ dependencies { compile 'javax.annotation:javax.annotation-api:1.2' compile 'com.android.support:support-v4:22.1.0@aar' compile 'com.squareup:otto:1.3.7' - compile ('com.mapzen:on-the-road:0.81-SNAPSHOT') { + compile ('com.mapzen:on-the-road:0.8-SNAPSHOT') { exclude group: 'org.apache.commons', module: 'commons-io' } From c3c3661fdff0f0720e871dd09cef97ef28c6ff6d Mon Sep 17 00:00:00 2001 From: kingofirony Date: Thu, 25 Jun 2015 11:14:07 -0400 Subject: [PATCH 6/8] downs memory in circle.yml --- circle.yml | 1 + gradle.properties | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 gradle.properties diff --git a/circle.yml b/circle.yml index 57f2960d..26a2f64e 100644 --- a/circle.yml +++ b/circle.yml @@ -8,6 +8,7 @@ machine: M2_HOME: $HOME/.m2/apache-maven-3.1.1/ M2: $HOME/.m2/apache-maven-3.1.1/bin/ ANDROID_HOME: /usr/local/android-sdk-linux + JAVA_OPTS: "-Xms256m -Xmx512m" dependencies: diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 07194838..00000000 --- a/gradle.properties +++ /dev/null @@ -1 +0,0 @@ -org.gradle.jvmargs=-XX:MaxPermSize=1024m From 119b952e10994be31a3e6604372cac1eab34d111 Mon Sep 17 00:00:00 2001 From: kingofirony Date: Thu, 25 Jun 2015 14:25:19 -0400 Subject: [PATCH 7/8] moves some directionListLogic to presenter --- .../erasermap/presenter/MainPresenter.kt | 1 + .../erasermap/presenter/MainPresenterImpl.kt | 4 + .../erasermap/view/InstructionListActivity.kt | 32 +++--- .../com/mapzen/erasermap/view/MainActivity.kt | 39 ++++--- .../mapzen/erasermap/view/ViewController.kt | 1 + .../main/res/layout/activity_instructions.xml | 2 +- .../layout/route_header_direction_list.xml | 104 ------------------ .../view/InstructionListActivityTest.java | 12 +- .../erasermap/view/MainActivityTest.java | 6 +- 9 files changed, 55 insertions(+), 146 deletions(-) delete mode 100644 app/src/main/res/layout/route_header_direction_list.xml diff --git a/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenter.kt b/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenter.kt index c1fbe41f..806d635a 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenter.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenter.kt @@ -13,6 +13,7 @@ public interface MainPresenter { public fun onSearchResultSelected(position: Int) public fun onExpandSearchView() public fun onCollapseSearchView() + public fun onShowDirectionList() public fun onQuerySubmit() public fun onViewAllSearchResults() public fun onBackPressed() diff --git a/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenterImpl.kt b/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenterImpl.kt index 55cae212..67b4664a 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenterImpl.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/presenter/MainPresenterImpl.kt @@ -77,4 +77,8 @@ public class MainPresenterImpl() : MainPresenter { viewController?.shutDown() } } + + override fun onShowDirectionList() { + viewController?.showDirectionList() + } } diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt index 477de281..4f95cc63 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/InstructionListActivity.kt @@ -22,8 +22,9 @@ public class InstructionListActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_instructions) - getSupportActionBar().hide() + getSupportActionBar()?.hide() val listView = findViewById(R.id.instruction_list_view) as ListView + findViewById(R.id.route_reverse).setVisibility(View.GONE) val bundle = getIntent()?.getExtras() val instruction_strings: ArrayList? = bundle?.getStringArrayList("instruction_strings") val instruction_types: ArrayList? = bundle?.getIntegerArrayList("instruction_types") @@ -67,18 +68,20 @@ public class InstructionListActivity : AppCompatActivity() { private var instruction_types: ArrayList? = types private var instruction_distances: ArrayList? = distances private var context: Context = context - private var reverse : Boolean = reverse; + private var reverse : Boolean = reverse override fun getCount(): Int { - return (instruction_strings!!.size() + CURRENT_LOCATION_OFFSET) - } + var size = if (instruction_strings != null) (instruction_strings!!.size() + + CURRENT_LOCATION_OFFSET) else 0 + return size + } override fun getItemId(position: Int): Long { - return 0; + return 0 } override fun getItem(position: Int): Any? { - return 0; + return 0 } override fun getView(position: Int, convertView: View?, parent: ViewGroup): View? { @@ -92,11 +95,12 @@ public class InstructionListActivity : AppCompatActivity() { } private fun setReversedDirectionListItem(position : Int, view : View) { - if(position == instruction_strings!!.size()) { - setListItemToCurrentLocation(view); + if(position == instruction_strings?.size()) { + setListItemToCurrentLocation(view) } else { - var distanceVal : Int = instruction_distances!!.get(position).toInt() - var formattedDistance : String = DistanceFormatter.format(distanceVal) + var distanceVal : Int? = instruction_distances?.get(position) + var formattedDistance : String = DistanceFormatter.format( + (distanceVal?.toInt() as Int)) var iconId : Int = DisplayHelper.getRouteDrawable(context, instruction_types?.get(position)) @@ -111,15 +115,14 @@ public class InstructionListActivity : AppCompatActivity() { if (position == 0 ) { setListItemToCurrentLocation(view) } else { - var distanceVal : Int = instruction_distances!! - .get(position - CURRENT_LOCATION_OFFSET).toInt() - var distance : String = DistanceFormatter.format(distanceVal) + var distanceVal : Int? = instruction_distances?.get(position - CURRENT_LOCATION_OFFSET) + var formattedDistance : String = DistanceFormatter.format((distanceVal?.toInt() as Int)) var iconId : Int = DisplayHelper.getRouteDrawable(context, instruction_types?.get(position - CURRENT_LOCATION_OFFSET)) (view.findViewById(R.id.simple_instruction) as TextView).setText( instruction_strings?.get(position - CURRENT_LOCATION_OFFSET).toString()) - (view.findViewById(R.id.distance) as TextView).setText(distance) + (view.findViewById(R.id.distance) as TextView).setText(formattedDistance) (view.findViewById(R.id.icon) as ImageView).setImageResource(iconId) } } @@ -129,4 +132,5 @@ public class InstructionListActivity : AppCompatActivity() { (view.findViewById(R.id.icon) as ImageView).setImageResource(R.drawable.ic_locate) } } + } diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt index 82971ce9..37ed57e5 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/MainActivity.kt @@ -551,24 +551,8 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback private fun initreverseButton() { (findViewById(R.id.route_reverse) as ImageButton).setOnClickListener({ reverse()}) - (findViewById(R.id.routing_circle) as ImageButton).setOnClickListener ({ - val instructionStrings = ArrayList() - val instructionType= ArrayList() - val instructionDistance= ArrayList() - for(instruction in route!!.getRouteInstructions() ) { - instructionStrings.add(instruction.getHumanTurnInstruction()) - instructionType.add(instruction.turnInstruction) - instructionDistance.add(instruction.distance) - } - val simpleFeature = SimpleFeature.fromFeature(destination) - val intent = Intent(this, javaClass()) - intent.putExtra("instruction_strings", instructionStrings) - intent.putExtra("instruction_types", instructionType) - intent.putExtra("instruction_distances", instructionDistance) - intent.putExtra("destination", simpleFeature.toString()) - intent.putExtra("reverse", this.reverse) - startActivityForResult(intent, requestCodeSearchResults) - }) + (findViewById(R.id.routing_circle) as ImageButton).setOnClickListener ( + {presenter?.onShowDirectionList()}) } override fun onBackPressed() { @@ -584,6 +568,25 @@ public class MainActivity : AppCompatActivity(), ViewController, Router.Callback finish() } + override fun showDirectionList() { + val instructionStrings = ArrayList() + val instructionType= ArrayList() + val instructionDistance= ArrayList() + for(instruction in route!!.getRouteInstructions() ) { + instructionStrings.add(instruction.getHumanTurnInstruction()) + instructionType.add(instruction.turnInstruction) + instructionDistance.add(instruction.distance) + } + val simpleFeature = SimpleFeature.fromFeature(destination) + val intent = Intent(this, javaClass()) + intent.putExtra("instruction_strings", instructionStrings) + intent.putExtra("instruction_types", instructionType) + intent.putExtra("instruction_distances", instructionDistance) + intent.putExtra("destination", simpleFeature.toString()) + intent.putExtra("reverse", this.reverse) + startActivityForResult(intent, requestCodeSearchResults) + } + private fun getInitializedRouter(): Router { when(type) { Router.Type.DRIVING -> return Router().setApiKey(BuildConfig.VALHALLA_API_KEY).setDriving() diff --git a/app/src/main/kotlin/com/mapzen/erasermap/view/ViewController.kt b/app/src/main/kotlin/com/mapzen/erasermap/view/ViewController.kt index 530207bd..7598b2e9 100644 --- a/app/src/main/kotlin/com/mapzen/erasermap/view/ViewController.kt +++ b/app/src/main/kotlin/com/mapzen/erasermap/view/ViewController.kt @@ -4,6 +4,7 @@ import com.mapzen.pelias.gson.Feature public interface ViewController { public fun showSearchResults(features: List) + public fun showDirectionList() public fun centerOnCurrentFeature(features: List) public fun showAllSearchResults(features: List) public fun hideSearchResults() diff --git a/app/src/main/res/layout/activity_instructions.xml b/app/src/main/res/layout/activity_instructions.xml index 9096cd1b..a5e80d42 100644 --- a/app/src/main/res/layout/activity_instructions.xml +++ b/app/src/main/res/layout/activity_instructions.xml @@ -3,7 +3,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - diff --git a/app/src/main/res/layout/route_header_direction_list.xml b/app/src/main/res/layout/route_header_direction_list.xml deleted file mode 100644 index 453ca8d8..00000000 --- a/app/src/main/res/layout/route_header_direction_list.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/test/java/com/mapzen/erasermap/view/InstructionListActivityTest.java b/app/src/test/java/com/mapzen/erasermap/view/InstructionListActivityTest.java index b24b4baf..878a2a39 100644 --- a/app/src/test/java/com/mapzen/erasermap/view/InstructionListActivityTest.java +++ b/app/src/test/java/com/mapzen/erasermap/view/InstructionListActivityTest.java @@ -36,12 +36,12 @@ @RunWith(PrivateMapsTestRunner.class) @Config(constants = BuildConfig.class, emulateSdk = 21) public class InstructionListActivityTest { - private MainActivity startActivity; + private static MainActivity startActivity = Robolectric.setupActivity(MainActivity.class);; private InstructionListActivity activity; @Before public void setUp() throws Exception { - startActivity = Robolectric.setupActivity(MainActivity.class); + startActivity.setReverse(false); startActivity.showRoutePreview(getTestFeature()); startActivity.success(new Route(getFixture("valhalla_route"))); startActivity.findViewById(R.id.routing_circle).performClick(); @@ -79,7 +79,7 @@ public void shouldHaveListView() throws Exception { } @Test - public void onDirectionListOpen_ShouldHaveOriginSet() throws Exception { + public void onDirectionListOpen_shouldHaveOriginSet() throws Exception { assertThat(((TextView)activity.findViewById(R.id.destination)).getText()) .isEqualTo( SimpleFeature.fromFeature(startActivity.getDestination()).toString()); assertThat(((TextView)activity.findViewById(R.id.starting_point)).getText()) @@ -87,7 +87,7 @@ public void onDirectionListOpen_ShouldHaveOriginSet() throws Exception { } @Test - public void onDirectionListOpenReversed_ShouldHaveOriginSet() throws Exception { + public void onDirectionListOpenReversed_shouldHaveOriginSet() throws Exception { setActivityToReverse(); assertThat(((TextView) activity.findViewById(R.id.starting_point)).getText()) .isEqualTo(SimpleFeature.fromFeature(startActivity.getDestination()).toString()); @@ -96,7 +96,7 @@ public void onDirectionListOpenReversed_ShouldHaveOriginSet() throws Exception { } @Test - public void onDirectionListOpen_ShouldHaveCurrentLocationFirst() throws Exception { + public void onDirectionListOpen_shouldHaveCurrentLocationFirst() throws Exception { View view = ((ListView) activity.findViewById(R.id.instruction_list_view)).getAdapter() .getView(0, activity.findViewById(R.id.instruction_list_view), getGenericViewGroup()); @@ -111,7 +111,7 @@ public void onDirectionListOpen_ShouldHaveCurrentLocationFirst() throws Exceptio } @Test - public void onDirectionListOpen_ShouldHaveFirstInstructionFirst() throws Exception { + public void onDirectionListOpen_shouldHaveFirstInstructionFirst() throws Exception { View view = ((ListView) activity.findViewById(R.id.instruction_list_view)).getAdapter() .getView(1, activity.findViewById(R.id.instruction_list_view), getGenericViewGroup()); diff --git a/app/src/test/java/com/mapzen/erasermap/view/MainActivityTest.java b/app/src/test/java/com/mapzen/erasermap/view/MainActivityTest.java index 79470744..43736f62 100644 --- a/app/src/test/java/com/mapzen/erasermap/view/MainActivityTest.java +++ b/app/src/test/java/com/mapzen/erasermap/view/MainActivityTest.java @@ -384,7 +384,7 @@ public void onBack_shouldHideDrawnRoute() throws Exception { } @Test - public void onRadioClick_ShouldChangeType() throws Exception { + public void onRadioClick_shouldChangeType() throws Exception { activity.showRoutePreview(getTestFeature()); activity.success(new Route(getFixture("valhalla_route"))); activity.findViewById(R.id.route_preview).findViewById(R.id.by_bike).performClick(); @@ -396,7 +396,7 @@ public void onRadioClick_ShouldChangeType() throws Exception { } @Test - public void onReverseClick_ShouldSetReverse() throws Exception { + public void onReverseClick_shouldSetReverse() throws Exception { activity.showRoutePreview(getTestFeature()); activity.success(new Route(getFixture("valhalla_route"))); assertThat(activity.getReverse()).isFalse(); @@ -405,7 +405,7 @@ public void onReverseClick_ShouldSetReverse() throws Exception { } @Test - public void onRoutingCircleClick_ShouldOpenDirectionListActivity() throws Exception { + public void onRoutingCircleClick_shouldOpenDirectionListActivity() throws Exception { activity.showRoutePreview(getTestFeature()); activity.success(new Route(getFixture("valhalla_route"))); assertThat(activity.findViewById(R.id.instruction_list_view)).isNull(); From 67c211baf48419bd644b7cda040db84e6380cdac Mon Sep 17 00:00:00 2001 From: kingofirony Date: Thu, 25 Jun 2015 14:39:57 -0400 Subject: [PATCH 8/8] adds test of main presenter about direction list visibility --- .../mapzen/erasermap/presenter/MainPresenterTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/test/java/com/mapzen/erasermap/presenter/MainPresenterTest.java b/app/src/test/java/com/mapzen/erasermap/presenter/MainPresenterTest.java index 90d5cb35..a2c49698 100644 --- a/app/src/test/java/com/mapzen/erasermap/presenter/MainPresenterTest.java +++ b/app/src/test/java/com/mapzen/erasermap/presenter/MainPresenterTest.java @@ -140,6 +140,12 @@ public void onBackPressed_shouldHideRoutePreview() throws Exception { assertThat(controller.isRoutePreviewVisible).isFalse(); } + @Test + public void onShowDirectionList_shouldMakeDirectionsVisible(){ + presenter.onShowDirectionList(); + assertThat(controller.isDirectionListVisible).isTrue(); + } + private class TestViewController implements ViewController { private List searchResults; private boolean isProgressVisible; @@ -147,6 +153,7 @@ private class TestViewController implements ViewController { private boolean isViewAllVisible; private boolean isSearchVisible; private boolean isRoutePreviewVisible; + private boolean isDirectionListVisible; @Override public void showSearchResults(@NotNull List features) { searchResults = (List) features; @@ -200,5 +207,8 @@ private class TestViewController implements ViewController { @Override public void shutDown() { } + + @Override + public void showDirectionList() { isDirectionListVisible = true;} } }