[android] - move camera logic to dedicated transform class (#6919)
* [android] - move camera logic to dedicated transform class post camera updates to the message queue, this makes calling an new camera update in the on finish of another update possible. Simplify transform.java implementation. * fail the step if instrumentation tests fail, fixup typo
This commit is contained in:
@@ -61,6 +61,13 @@ public class CameraAnimationTypeActivity extends AppCompatActivity implements On
|
||||
}
|
||||
});
|
||||
|
||||
mapboxMap.setOnCameraChangeListener(new MapboxMap.OnCameraChangeListener() {
|
||||
@Override
|
||||
public void onCameraChange(CameraPosition position) {
|
||||
Log.e(MapboxConstants.TAG, "OnCameraChange: " + position);
|
||||
}
|
||||
});
|
||||
|
||||
// handle move button clicks
|
||||
View moveButton = findViewById(R.id.cameraMoveButton);
|
||||
if (moveButton != null) {
|
||||
|
||||
@@ -54,6 +54,14 @@ public class CameraPositionActivity extends AppCompatActivity implements OnMapRe
|
||||
@Override
|
||||
public void onMapReady(@NonNull final MapboxMap mapboxMap) {
|
||||
this.mapboxMap = mapboxMap;
|
||||
|
||||
mapboxMap.setOnCameraChangeListener(new MapboxMap.OnCameraChangeListener() {
|
||||
@Override
|
||||
public void onCameraChange(CameraPosition position) {
|
||||
Log.e(MapboxConstants.TAG, "OnCameraChange: " + position);
|
||||
}
|
||||
});
|
||||
|
||||
// add a listener to FAB
|
||||
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
|
||||
fab.setColorFilter(ContextCompat.getColor(CameraPositionActivity.this, R.color.primary));
|
||||
|
||||
Reference in New Issue
Block a user