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

Commit

Permalink
Refactored to satellite opacity to SatelliteOpacityOnZoomActivity
Browse files Browse the repository at this point in the history
  • Loading branch information
langsmith committed Jun 7, 2019
1 parent fd1427c commit 82be5e2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
import com.mapbox.mapboxandroiddemo.examples.styles.MissingIconActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.RotatingTextAnchorPositionActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.ShowHideLayersActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.StyleFadeSwitchActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.SatelliteOpacityOnZoomActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.TextFieldFormattingActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.TextFieldMultipleFormatsActivity;
import com.mapbox.mapboxandroiddemo.examples.styles.TransparentBackgroundActivity;
Expand Down Expand Up @@ -638,11 +638,11 @@ private void initializeModels() {

exampleItemModels.add(new ExampleItemModel(
R.id.nav_styles,
R.string.activity_styles_fade_switch_title,
R.string.activity_styles_fade_switch_description,
new Intent(MainActivity.this, StyleFadeSwitchActivity.class),
R.string.activity_styles_satellite_opacity_on_zoom_title,
R.string.activity_style_satellite_opacity_on_zoom_description,
new Intent(MainActivity.this, SatelliteOpacityOnZoomActivity.class),
null,
R.string.activity_styles_fade_switch_url, false, BuildConfig.MIN_SDK_VERSION));
R.string.activity_style_satellite_opacity_on_zoom_url, false, BuildConfig.MIN_SDK_VERSION));

exampleItemModels.add(new ExampleItemModel(
R.id.nav_styles,
Expand Down
4 changes: 2 additions & 2 deletions MapboxAndroidDemo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@
android:value="com.mapbox.mapboxandroiddemo.MainActivity" />
</activity>
<activity
android:name=".examples.styles.StyleFadeSwitchActivity"
android:label="@string/activity_styles_fade_switch_title">
android:name=".examples.styles.SatelliteOpacityOnZoomActivity"
android:label="@string/activity_styles_satellite_opacity_on_zoom_title">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.mapbox.mapboxandroiddemo.MainActivity" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* Go from the Mapbox Streets style to a satellite photo raster layer as the map camera zooms in.
* This is similar to how Snap uses Mapbox for Snap Maps.
*/
public class StyleFadeSwitchActivity extends AppCompatActivity implements
public class SatelliteOpacityOnZoomActivity extends AppCompatActivity implements
OnMapReadyCallback {

private MapView mapView;
Expand All @@ -40,7 +40,7 @@ protected void onCreate(Bundle savedInstanceState) {
Mapbox.getInstance(this, getString(R.string.access_token));

// This contains the MapView in XML and needs to be called after the access token is configured.
setContentView(R.layout.activity_style_fade_switch);
setContentView(R.layout.activity_satellite_opacity_on_zoom);

mapView = findViewById(R.id.mapView);
mapView.onCreate(savedInstanceState);
Expand Down Expand Up @@ -71,7 +71,6 @@ public void onStyleLoaded(@NonNull Style style) {
CameraUpdateFactory.newCameraPosition(new CameraPosition.Builder()
.zoom(19)
.build()), 9000);

}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<string name="activity_style_image_source_time_lapse_description">Use an image source and a runnable to show data changes over time.</string>
<string name="activity_style_image_source_description">Use an image source to easily display images on the map.</string>
<string name="activity_style_hillshade_description">Use elevation data to show and customize hills and mountains.</string>
<string name="activity_styles_fade_switch_description">Fade map styles in and out based on zoom level.</string>
<string name="activity_style_satellite_opacity_on_zoom_description">Adjust the opacity of a satellite raster layer based on zoom level.</string>
<string name="activity_styles_text_field_multiple_formats_description">Use a format expression to style labels with multiple languages, fonts, sizes, and colors.</string>
<string name="activity_styles_transparent_background_description">Create a transparent background and fill it with something such as moving water.</string>
<string name="activity_styles_click_to_add_image_description">Select a photo on the device and add it on the map tap location.</string>
Expand Down
2 changes: 1 addition & 1 deletion MapboxAndroidDemo/src/main/res/values/titles_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<string name="activity_style_image_source_time_lapse_title">Show time lapse</string>
<string name="activity_style_image_source_title">Use an image source</string>
<string name="activity_styles_hillshade_title">Hillshading</string>
<string name="activity_styles_fade_switch_title">Switch map styles with fade</string>
<string name="activity_styles_satellite_opacity_on_zoom_title">Opacity fade</string>
<string name="activity_styles_text_field_multiple_formats_title">Multiple text formats</string>
<string name="activity_styles_transparent_background_title">Transparent render surface</string>
<string name="activity_styles_click_to_add_image_title">Click to add photo</string>
Expand Down
2 changes: 1 addition & 1 deletion MapboxAndroidDemo/src/main/res/values/urls_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<string name="activity_style_image_source_time_lapse_url" translatable="false">http://i.imgur.com/ijoGPrF.png</string>
<string name="activity_style_image_source_url" translatable="false">https://i.imgur.com/I6B6cCE.png</string>
<string name="activity_style_hillshade_url" translatable="false">https://i.imgur.com/U2OKixV.png</string>
<string name="activity_styles_fade_switch_url" translatable="false">https://i.imgur.com/1sPnDx5.png</string>
<string name="activity_style_satellite_opacity_on_zoom_url" translatable="false">https://i.imgur.com/1sPnDx5.png</string>
<string name="activity_styles_text_field_multiple_formats_url" translatable="false">https://i.imgur.com/dpiGiTg.png</string>
<string name="activity_styles_transparent_background_url" translatable="false">https://i.imgur.com/5bYnlp5.png</string>
<string name="activity_styles_click_to_add_image_url" translatable="false">https://i.imgur.com/uPIH5Ck.png</string>
Expand Down

0 comments on commit 82be5e2

Please sign in to comment.