Skip to content

Commit

Permalink
Solved issue where map is null after on click of the satellite button (
Browse files Browse the repository at this point in the history
  • Loading branch information
ferranpons authored Dec 4, 2017
1 parent 0531946 commit 2996196
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Include the dependency in your app `build.gradle`:

```groovy
dependencies {
compile 'com.schibstedspain.android:leku:3.6.0'
compile 'com.schibstedspain.android:leku:3.6.1'
}
```

Expand Down
6 changes: 3 additions & 3 deletions leku/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'com.novoda.bintray-release'
apply from: '../quality.gradle'

group = 'com.schibstedspain.android'
version = '3.6.0'
version = '3.6.1'

android {
compileSdkVersion 26
Expand Down Expand Up @@ -54,7 +54,7 @@ dependencies {
implementation 'pl.charmas.android:android-reactive-location2:2.0@aar'

implementation "io.reactivex:rxandroid:1.2.1"
implementation 'io.reactivex.rxjava2:rxjava:2.1.6'
implementation 'io.reactivex.rxjava2:rxjava:2.1.7'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'nl.littlerobots.rxlint:rxlint:1.6'

Expand All @@ -70,7 +70,7 @@ publish {
userOrg = 'schibstedspain'
groupId = 'com.schibstedspain.android'
artifactId = 'leku'
publishVersion = '3.6.0'
publishVersion = '3.6.1'
desc = 'Location picker component for Android. It returns a latitude,longitude and an address based on the location picked in the LocationPickerActivity provided.'
website = 'https://github.com/SchibstedSpain/leku'
}
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,10 @@ private void setUpFloatingButtons() {

FloatingActionButton btnSatellite = findViewById(R.id.btnSatellite);
btnSatellite.setOnClickListener(view -> {
map.setMapType(map.getMapType() == MAP_TYPE_SATELLITE ? MAP_TYPE_NORMAL : MAP_TYPE_SATELLITE);
btnSatellite.setImageResource(map.getMapType() == MAP_TYPE_SATELLITE ? R.drawable.ic_satellite_off : R.drawable.ic_satellite_on);
if (map != null && btnSatellite != null) {
map.setMapType(map.getMapType() == MAP_TYPE_SATELLITE ? MAP_TYPE_NORMAL : MAP_TYPE_SATELLITE);
btnSatellite.setImageResource(map.getMapType() == MAP_TYPE_SATELLITE ? R.drawable.ic_satellite_off : R.drawable.ic_satellite_on);
}
});
btnSatellite.setVisibility(enableSatelliteView ? View.VISIBLE : View.GONE);
}
Expand Down

0 comments on commit 2996196

Please sign in to comment.