android - when i am doing 3d transition the animation gets stop for sometime -
When I'm transitioning 3D, the scene is stopping for a while and then rotating two scenes View the view list and the map and the second are viewing the list view with both the view database
(the code blocks are fixed)
/ ** * on the container view Setup a new 3D rotation * * @ Paramayum status was clicked to show the image, or to show the list For the -1, the starting angle must start at which the rotation should start * @ the ultimate angle of the rotation should be eliminated / private zero applyRotation (int position, float start, flat end) {/ Find the center of the last float center of the container X = M.container.getWidth () / 2.0F; Last float center Y = mContainer.getHeight () / 2.0F; Last float center X2 = mContainerView.getWidth () / 2.0F; Last float center Y2 = mContainerView.getHeight () / 2.0F; // Create a new 3D rotation with the supplied parameter / Animation listener is used to trigger the last animation on the next rotate3dAnimation rotation = new Rotate3dAnimation (start, end, centerX, centerY, 310.0f, true); Rotation.setDuration (500); Rotation.setFillAfter (true); Rotation.setInterpolator (new acceleration interpolator ()); Rotation.setAnimationListener (new DisplayNextView (status)); MContainer.startAnimation (rotation); // Last Rotate3dAnimation rotation2 = New Rotate3dAnimation to view (start, end, centerX2, centerY2, 310.0f, true); Rotation2.setDuration (500); Rotation2.setFillAfter (true); Rotation2.setInterpolator (New Accelerator Interpolator ()); // rotation 2.set animation logger (new display directory view) (position)); MContainerView.startAnimation (rotation2); } / ** * This class listens for the end of the first half of the animation. * It then posts a new action which effectively swaps ideas when the container rotates 90 degrees and is thus invisible. * Animation / Private Last Class DisplayNextView implements. Animation Listener {Private Finals Inc. mPosition; Private DisplayNextView (int position) {mPosition = Status; } Public Zero on AnimationStart (Animation Animation) {} Public Zero on AnimationInter (Animation Animation) {mContainer.post (new swap view (mPosition)); } Animation repetition (Animation animation) on Public Zero {}} / ** * is responsible for swapping ideas of this class and second * half of the animation * / Private Final Class Swapvies Runnabal {Private Final Input; Public swap view (status of int) {mPosition = status; } Public Zero Run () {Final Float Center x = mContainer.getWidth () / 2.0F; Last float center Y = mContainer.getHeight () / 2.0F; Rotate 3D animation rotation; Last float center X2 = mContainerView.getWidth () / 2.0F; Last float center Y2 = mContainerView.getHeight () / 2.0F; Rotate 3d animation rotation 2; If (mPosition == 2) {mButtonCounty.setVisibility (button. GONE); MButtonRadar.setVisibility (Button.VISIBLE); MButtonRadar.requestFocus (); MNearShopsView.setVisibility (LinearLayout.GONE); MCountyListView.setVisibility (RelativeLayout.VISIBLE); MCountyListView.requestFocus (); Rotation = new rotate 3D animation (90, 180, center x, center y, 310.0 f, falls); Rotation 2 = New Rotate 3D animation (90,180, Center X2, Center Y2, 310.0F, incorrect); } Other {mButtonRadar.setVisibility (buttons. GONE); MButtonCounty.setVisibility (Button.VISIBLE); MButtonCounty.requestFocus (); MCountyListView.setVisibility (RelativeLayout.GONE); MNearShopsView.setVisibility (LinearLayout.VISIBLE); MNearShopsView.requestFocus (); Rotation = new rotate 3D animation (90, 0, center x, center y, 310.0 f, falls); Rotation 2 = New rotate 3D animation (90.0, Center X2, Center Y2, 310.0F, true); } Rotation.setDuration (50); Rotation.setFillAfter (wrong); Rotation.setInterpolator (New Dispatcher Interpolator ()); MContainer.startAnimation (rotation); Rotation2.setDuration (50); Rotation2.setFillAfter (wrong); Rotation2.setInterpolator (new discreet interpreter ()); MContainerView.startAnimation (rotation2); }}
Do you get this "stop" while doing a non-3D transaction? If not, then you should enable the drawing on your thoughts. It mainly has effects in TextViews because they repeat themselves in each stage of the animation. See in your views . SetdownCache enabled (true); Set .
Comments
Post a Comment