List of usage examples for android.graphics PointF toString
@Override
public String toString()
From source file:net.evendanan.pushingpixels.PassengerFragmentSupport.java
@Nullable public static Animation onCreateAnimation(@NonNull Fragment passengerFragment, int transit, boolean enter, int nextAnim) { Log.d(TAG, "onCreateAnimation: transit: " + transit + ", enter: " + enter + ", nextAnim: " + nextAnim); final boolean validTransitionToModify = nextAnim == R.anim.ui_context_expand_add_in || nextAnim == R.anim.ui_context_expand_pop_out; if (!validTransitionToModify) return null; ScaleAnimation scale = null;/*from w w w . ja v a2s . co m*/ PointF originateViewCenterPoint = PointFCompat.getPointFromBundle(passengerFragment.getArguments(), EXTRA_ORIGINATE_VIEW_CENTER); PointF originateViewScale = PointFCompat.getPointFromBundle(passengerFragment.getArguments(), EXTRA_ORIGINATE_VIEW_SCALE); if (originateViewCenterPoint != null && originateViewScale != null) { Log.d(TAG, "originateViewCenterPoint: " + originateViewCenterPoint.toString()); if (enter && nextAnim == R.anim.ui_context_expand_add_in) { scale = new ScaleAnimation(originateViewScale.x, 1.0f, originateViewScale.y, 1.0f, ScaleAnimation.ABSOLUTE, originateViewCenterPoint.x, ScaleAnimation.ABSOLUTE, originateViewCenterPoint.y); } else if (!enter && nextAnim == R.anim.ui_context_expand_pop_out) { scale = new ScaleAnimation(1.0f, originateViewScale.x, 1.0f, originateViewScale.y, ScaleAnimation.ABSOLUTE, originateViewCenterPoint.x, ScaleAnimation.ABSOLUTE, originateViewCenterPoint.y); } } if (scale == null) { //no originate view, so I'll add generic scale-animation if (enter) { scale = new ScaleAnimation(0.4f, 1.0f, 0.4f, 1.0f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f); } else { scale = new ScaleAnimation(1.0f, 0.4f, 1.0f, 0.4f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f); } } scale.setDuration(passengerFragment.getResources().getInteger(android.R.integer.config_mediumAnimTime)); AnimationSet set = (AnimationSet) AnimationUtils .loadAnimation(passengerFragment.getActivity().getApplicationContext(), nextAnim); set.addAnimation(scale); return set; }