Skip to content

Commit

Permalink
Merge pull request #13 from vshkl/map_activity_refactoring
Browse files Browse the repository at this point in the history
map_activity_refactoring to master
  • Loading branch information
vshkl authored May 22, 2017
2 parents f30825a + ead1e5d commit 3e36638
Show file tree
Hide file tree
Showing 8 changed files with 162 additions and 93 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "by.vshkl.translate2"
minSdkVersion 19
targetSdkVersion 25
versionCode 3
versionName "0.5.1"
versionCode 4
versionName "0.5.2"
vectorDrawables.useSupportLibrary = true
resConfigs "en", "ru", "be"
buildConfigField("String", "ENCRYPTED_PREFERENCES_PWD", ENCRYPTED_PREFERENCES_PWD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.arellomobile.mvp.InjectViewState;
import com.arellomobile.mvp.MvpPresenter;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down Expand Up @@ -268,4 +269,12 @@ public String getSelectedStopBookmarkName() {
}
return stopBookmarkName;
}

public void setupGoogleMap() {
getViewState().setupGoogleMap();
}

public void animateMapCamera(LatLng latLng, float zoomLevel) {
getViewState().animateMapCamera(latLng, zoomLevel);
}
}
15 changes: 9 additions & 6 deletions app/src/main/java/by/vshkl/translate2/mvp/view/MapView.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package by.vshkl.translate2.mvp.view;

import com.arellomobile.mvp.MvpView;
import com.google.android.gms.maps.model.LatLng;

import java.util.List;

Expand All @@ -10,25 +11,27 @@

public interface MapView extends MvpView {

void showProgressBar();

void hideProgressBar();

void showUpdateStopsSnackbar();

void showNewVersionAvailable(Version version);

void initializeMap();

void showMessage(int messageId);

void showToast(int messageId);

void setupGoogleMap();

void animateMapCamera(LatLng latLng, float zoomLevel);

void placeMarkers(List<Stop> stops);

void showSelectedStop(Stop stop, boolean bookmarked, boolean fromNavDrawer);

void showSearchResult(List<Stop> stops);

void showStopBookmarks(List<StopBookmark> stopBookmarks);

void showProgressBar();

void hideProgressBar();
}
Loading

0 comments on commit 3e36638

Please sign in to comment.