Skip to content

Commit

Permalink
Fix huge resources by changing to jpg, fix NullPointerException when …
Browse files Browse the repository at this point in the history
…station isn't found in database
  • Loading branch information
Bertware committed Apr 10, 2018
1 parent 8140a3c commit cb11cb1
Show file tree
Hide file tree
Showing 91 changed files with 17 additions and 11 deletions.
10 changes: 7 additions & 3 deletions Hyperrail/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.google.firebase.firebase-crash'

def VERSION_CODE = 24
def VERSION_NAME = '1.0.0'
def VERSION_CODE = 25
def VERSION_NAME = '1.0.1'

android {
signingConfigs {
Expand All @@ -36,9 +36,13 @@ android {
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (!System.getenv("RUNNING_ON_TRAVIS_CI")) signingConfig signingConfigs.production
}
debug {
minifyEnabled false
}
}
compileOptions {
targetCompatibility 1.7
Expand All @@ -57,7 +61,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})

implementation 'com.android.volley:volley:1.0.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'joda-time:joda-time:2.9.9'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,17 @@ public void onMapReady(final GoogleMap map) {

for (int i = 0; i < mCurrentTrain.getStops().length; i++) {
Station s = mCurrentTrain.getStops()[i].getStation();
locations[i] = new LatLng(s.getLatitude(), s.getLongitude());
if (mCurrentTrain.getStops()[i].hasLeft()) {
passedLocations.add(locations[i]);
map.addMarker(new MarkerOptions().position(locations[i]).title(s.getLocalizedName()).icon(colorIcon).anchor(0.5f, 0.5f));
} else {
futureLocations.add(locations[i]);
map.addMarker(new MarkerOptions().position(locations[i]).title(s.getLocalizedName()).icon(greyIcon).anchor(0.5f, 0.5f));
if (s != null) {
locations[i] = new LatLng(s.getLatitude(), s.getLongitude());
if (mCurrentTrain.getStops()[i].hasLeft()) {
passedLocations.add(locations[i]);
map.addMarker(new MarkerOptions().position(locations[i]).title(s.getLocalizedName()).icon(colorIcon).anchor(0.5f, 0.5f));
} else {
futureLocations.add(locations[i]);
map.addMarker(new MarkerOptions().position(locations[i]).title(s.getLocalizedName()).icon(greyIcon).anchor(0.5f, 0.5f));
}
builder.include(locations[i]);
}
builder.include(locations[i]);
}

final LatLngBounds bounds = builder.build();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed Hyperrail/src/main/res/drawable-xxxhdpi/ic_close.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed Hyperrail/src/main/res/drawable-xxxhdpi/ic_feedback.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed Hyperrail/src/main/res/drawable-xxxhdpi/ic_subway.png
Diff not rendered.
Binary file removed Hyperrail/src/main/res/drawable-xxxhdpi/ic_tram.png
Diff not rendered.

0 comments on commit cb11cb1

Please sign in to comment.