Skip to content

Commit

Permalink
Merge pull request #455 from mapzen/controller-package
Browse files Browse the repository at this point in the history
Create controller package for MainActivity
  • Loading branch information
ecgreb committed Mar 4, 2016
2 parents 68b22c4 + 558900e commit 69ff071
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 21 deletions.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity
android:name=".view.MainActivity"
android:name=".controller.MainActivity"
android:launchMode="singleTask"
android:label="@string/app_name" />
<activity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.mapzen.erasermap;

import com.mapzen.erasermap.controller.MainActivity;
import com.mapzen.erasermap.view.DistanceView;
import com.mapzen.erasermap.view.InitActivity;
import com.mapzen.erasermap.view.MainActivity;
import com.mapzen.erasermap.view.RouteModeView;
import com.mapzen.erasermap.view.SearchResultsAdapter;
import com.mapzen.erasermap.view.SettingsActivity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mapzen.erasermap.view
package com.mapzen.erasermap.controller

import android.content.Intent
import android.content.SharedPreferences
Expand Down Expand Up @@ -35,6 +35,16 @@ import com.mapzen.erasermap.util.AxisAlignedBoundingBox
import com.mapzen.erasermap.util.AxisAlignedBoundingBox.PointD
import com.mapzen.erasermap.util.NotificationBroadcastReceiver
import com.mapzen.erasermap.util.NotificationCreator
import com.mapzen.erasermap.view.CompassView
import com.mapzen.erasermap.view.InstructionListActivity
import com.mapzen.erasermap.view.MuteView
import com.mapzen.erasermap.view.RouteModeView
import com.mapzen.erasermap.view.RoutePreviewView
import com.mapzen.erasermap.view.SearchListViewAdapter
import com.mapzen.erasermap.view.SearchResultsAdapter
import com.mapzen.erasermap.view.SearchResultsView
import com.mapzen.erasermap.view.SettingsActivity
import com.mapzen.erasermap.view.VoiceNavigationController
import com.mapzen.pelias.Pelias
import com.mapzen.pelias.SavedSearch
import com.mapzen.pelias.SimpleFeature
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.mapzen.erasermap.view
package com.mapzen.erasermap.controller

import android.location.Location
import android.view.MotionEvent
import com.mapzen.pelias.gson.Feature
import com.mapzen.valhalla.Route

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mapzen.erasermap.presenter

import android.location.Location
import com.mapzen.erasermap.view.MainViewController
import com.mapzen.erasermap.controller.MainViewController
import com.mapzen.erasermap.view.RouteViewController
import com.mapzen.pelias.PeliasLocationProvider
import com.mapzen.pelias.gson.Feature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import com.mapzen.erasermap.presenter.ViewStateManager.ViewState.ROUTE_PREVIEW
import com.mapzen.erasermap.presenter.ViewStateManager.ViewState.ROUTING
import com.mapzen.erasermap.presenter.ViewStateManager.ViewState.SEARCH
import com.mapzen.erasermap.presenter.ViewStateManager.ViewState.SEARCH_RESULTS
import com.mapzen.erasermap.view.MainViewController
import com.mapzen.erasermap.controller.MainViewController
import com.mapzen.erasermap.view.RouteViewController
import com.mapzen.pelias.PeliasLocationProvider
import com.mapzen.pelias.gson.Feature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.mapzen.erasermap.EraserMapApplication
import com.mapzen.erasermap.view.MainActivity
import com.mapzen.erasermap.controller.MainActivity

public class NotificationBroadcastReceiver : BroadcastReceiver() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import android.support.v4.app.NotificationCompat
import android.support.v4.app.TaskStackBuilder
import com.mapzen.erasermap.R
import com.mapzen.erasermap.service.NotificationService
import com.mapzen.erasermap.view.MainActivity
import com.mapzen.erasermap.controller.MainActivity

public class NotificationCreator(private val mainActivity: Activity) {
private var builder: NotificationCompat.Builder? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.mapzen.erasermap.BuildConfig
import com.mapzen.erasermap.CrashReportService
import com.mapzen.erasermap.EraserMapApplication
import com.mapzen.erasermap.R
import com.mapzen.erasermap.controller.MainActivity
import com.mapzen.erasermap.model.ApiKeys
import com.mapzen.erasermap.model.SimpleCrypt
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.mapzen.erasermap.view

import com.mapzen.erasermap.BuildConfig
import com.mapzen.erasermap.PrivateMapsTestRunner
import com.mapzen.erasermap.controller.MainActivity
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
package com.mapzen.erasermap.view;

import android.content.Intent;
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.erasermap.controller.MainActivity;
import com.mapzen.pelias.SimpleFeature;
import com.mapzen.valhalla.Route;

Expand All @@ -21,6 +15,13 @@
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowActivity;

import android.content.Intent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import static com.mapzen.erasermap.dummy.TestHelper.getFixture;
import static com.mapzen.erasermap.dummy.TestHelper.getTestFeature;
import static com.mapzen.erasermap.dummy.TestHelper.getTestLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.mapzen.erasermap.BuildConfig;
import com.mapzen.erasermap.PrivateMapsTestRunner;
import com.mapzen.erasermap.R;
import com.mapzen.erasermap.controller.MainActivity;
import com.mapzen.erasermap.dummy.TestHelper;
import com.mapzen.erasermap.presenter.MainPresenter;
import com.mapzen.erasermap.presenter.MainPresenterImpl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.mapzen.erasermap.view
package com.mapzen.erasermap.controller

import android.content.ComponentName
import android.content.Context.LOCATION_SERVICE
Expand All @@ -22,6 +22,7 @@ import com.mapzen.erasermap.dummy.TestHelper.getTestLocation
import com.mapzen.erasermap.presenter.MainPresenter
import com.mapzen.erasermap.shadows.ShadowMapData
import com.mapzen.erasermap.shadows.ShadowTangram
import com.mapzen.erasermap.view.RouteModeView
import com.mapzen.pelias.SavedSearch
import com.mapzen.pelias.gson.Feature
import com.mapzen.tangram.LngLat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mapzen.erasermap.view
package com.mapzen.erasermap.controller

import android.location.Location
import android.graphics.PointF
import android.location.Location
import com.mapzen.pelias.gson.Feature
import com.mapzen.valhalla.Route

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import com.mapzen.erasermap.presenter.ViewStateManager.ViewState.ROUTE_DIRECTION
import com.mapzen.erasermap.presenter.ViewStateManager.ViewState.ROUTE_PREVIEW
import com.mapzen.erasermap.presenter.ViewStateManager.ViewState.ROUTING
import com.mapzen.erasermap.presenter.ViewStateManager.ViewState.SEARCH_RESULTS
import com.mapzen.erasermap.view.TestMainController
import com.mapzen.erasermap.controller.TestMainController
import com.mapzen.erasermap.view.TestRouteController
import com.mapzen.pelias.gson.Feature
import com.mapzen.pelias.gson.Result
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:

test:
override:
- case $CIRCLE_NODE_INDEX in 0) ./gradlew testDevDebug --tests='*.model.*' $TEST_OPTS ;; 1) ./gradlew testDevDebug --tests='*.view.*' $TEST_OPTS ;; 2) ./gradlew testDevDebug --tests='*.presenter.*' $TEST_OPTS ;; esac:
- case $CIRCLE_NODE_INDEX in 0) ./gradlew testDevDebug --tests='*.model.*' $TEST_OPTS ;; 1) ./gradlew testDevDebug --tests='*.view.*' $TEST_OPTS ;; 2) ./gradlew testDevDebug --tests='*.presenter.*' $TEST_OPTS ;; 3) ./gradlew testDevDebug --tests='*.controller.*' $TEST_OPTS ;; esac:
parallel: true
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit
Expand Down

0 comments on commit 69ff071

Please sign in to comment.