Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
tweaks based on @pengdev review
Browse files Browse the repository at this point in the history
  • Loading branch information
Langston Smith committed Sep 10, 2019
1 parent 5c1816a commit ee7ed65
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

Expand All @@ -22,6 +21,8 @@
*/
public class ChangeAttributionColorActivity extends AppCompatActivity implements OnMapReadyCallback {

private static final String CUSTOM_GREEN_MONOCHROME_STYLE_URI =
"mapbox://styles/appsatmapboxcom/ck0cyq1lt0bbo1cmwkpf2w7g9";
private MapView mapView;
private ImageView attributionView;
private int index = 0;
Expand Down Expand Up @@ -64,7 +65,6 @@ public void onStyleLoaded(@NonNull Style style) {
@Override
public void onClick(View view) {
if (index == attributionColors.length - 1) {

mapboxMap.setStyle(Style.LIGHT);
index = 0;
}
Expand All @@ -77,7 +77,8 @@ public void onClick(View view) {
// Adjust map to a custom monochrome dark green style to match the
// "i" attribution's dark green color
if (index == 4) {
mapboxMap.setStyle(new Style.Builder().fromUri("mapbox://styles/appsatmapboxcom/ck0cyq1lt0bbo1cmwkpf2w7g9"));
mapboxMap.setStyle(new Style.Builder()
.fromUri(CUSTOM_GREEN_MONOCHROME_STYLE_URI));
}

// Change the color of the "i" attribution button
Expand Down

0 comments on commit ee7ed65

Please sign in to comment.