@Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (mGroundOverlay != null) { mGroundOverlay.setTransparency((float) progress / (float) TRANSPARENCY_MAX); } }
@Override public void onAnimationUpdate(ValueAnimator valueAnimator) { Float val = (Float) valueAnimator.getAnimatedValue(); groundOverlay.setTransparency(val); } });
/** * Toggles the visibility between 100% and 50% when a {@link GroundOverlay} is clicked. */ @Override public void onGroundOverlayClick(GroundOverlay groundOverlay) { // Toggle transparency value between 0.0f and 0.5f. Initial default value is 0.0f. mGroundOverlayRotated.setTransparency(0.5f - mGroundOverlayRotated.getTransparency()); }
@Override public void setTransparency(float transparency) { real.setTransparency(transparency); }
@Override public void onAnimationUpdate(ValueAnimator valueAnimator) { Float val = (Float) valueAnimator.getAnimatedValue(); groundOverlay.setTransparency(val); } });
@Override public void onExitRegion(IARegion region) { if (mGroundOverlay != null) { // Indicate we left this floor plan but leave it there for reference // If we enter another floor plan, this one will be removed and another one loaded mGroundOverlay.setTransparency(0.5f); } mShowIndoorLocation = false; showInfo("Exit " + (region.getType() == IARegion.TYPE_VENUE ? "VENUE " : "FLOOR_PLAN ") + region.getId()); }
@Override public void onEnterRegion(IARegion region) { if (region.getType() == IARegion.TYPE_FLOOR_PLAN) { final String newId = region.getId(); // Are we entering a new floor plan or coming back the floor plan we just left? if (mGroundOverlay == null || !region.equals(mOverlayFloorPlan)) { mCameraPositionNeedsUpdating = true; // entering new fp, need to move camera if (mGroundOverlay != null) { mGroundOverlay.remove(); mGroundOverlay = null; } mOverlayFloorPlan = region; // overlay will be this (unless error in loading) fetchFloorPlanBitmap(region.getFloorPlan()); } else { mGroundOverlay.setTransparency(0.0f); } mShowIndoorLocation = true; showInfo("Showing IndoorAtlas SDK\'s location output"); } showInfo("Enter " + (region.getType() == IARegion.TYPE_VENUE ? "VENUE " : "FLOOR_PLAN ") + region.getId()); }