Add toast messages to test

This commit is contained in:
neslihanturan 2018-02-20 00:06:21 +03:00
parent 64503aaa63
commit 2f647a53e5
2 changed files with 7 additions and 3 deletions

View file

@ -409,18 +409,23 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
Fragment fragment = new NearbyListFragment(); Fragment fragment = new NearbyListFragment();
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragmentTransaction.replace(R.id.container, fragment, fragment.getClass().getSimpleName()); fragmentTransaction.replace(R.id.container_sheet, fragment, fragment.getClass().getSimpleName());
bottomSheetBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
fragmentTransaction.commitAllowingStateLoss(); fragmentTransaction.commitAllowingStateLoss();
} }
@Override @Override
public void onLocationChangedSignificantly(LatLng latLng) { public void onLocationChangedSignificantly(LatLng latLng) {
Toast.makeText(this, "onLocationChangedSignificantly",
Toast.LENGTH_LONG).show();
refreshView(false, refreshView(false,
LocationServiceManager.LocationChangeType.LOCATION_SIGNIFICANTLY_CHANGED); LocationServiceManager.LocationChangeType.LOCATION_SIGNIFICANTLY_CHANGED);
} }
@Override @Override
public void onLocationChangedSlightly(LatLng latLng) { public void onLocationChangedSlightly(LatLng latLng) {
Toast.makeText(this, "onLocationChangedSlightly",
Toast.LENGTH_LONG).show();
refreshView(false, refreshView(false,
LocationServiceManager.LocationChangeType.LOCATION_SLIGHTLY_CHANGED); LocationServiceManager.LocationChangeType.LOCATION_SLIGHTLY_CHANGED);
} }

View file

@ -268,7 +268,7 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
} }
private void setupMapView(Bundle savedInstanceState) { private void setupMapView(Bundle savedInstanceState) {
options = new MapboxMapOptions() MapboxMapOptions options = new MapboxMapOptions()
.styleUrl(Style.OUTDOORS) .styleUrl(Style.OUTDOORS)
.camera(new CameraPosition.Builder() .camera(new CameraPosition.Builder()
.target(new LatLng(curLatLng.getLatitude(), curLatLng.getLongitude())) .target(new LatLng(curLatLng.getLatitude(), curLatLng.getLongitude()))
@ -513,4 +513,3 @@ public class NearbyMapFragment extends android.support.v4.app.Fragment {
} }
} }
}