android-animation

Floating Action Button expansion [closed]

久未见 提交于 2019-12-20 08:23:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . According to the new Android Design Guidelines for the Floating Action Button, it should be reasonable to transform the Floating Action Button into a Toolbar. Are there any samples / examples to perform such a transformation? 回答1: To use reveal animation you need add a

Floating Action Button expansion [closed]

自古美人都是妖i 提交于 2019-12-20 08:22:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . According to the new Android Design Guidelines for the Floating Action Button, it should be reasonable to transform the Floating Action Button into a Toolbar. Are there any samples / examples to perform such a transformation? 回答1: To use reveal animation you need add a

Animate the removal of a ListView item

北慕城南 提交于 2019-12-20 08:10:29
问题 I'm attempting to animate the removal of a ListView item using this: mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, final View view, final int i, long l) { view.animate().setDuration(500).x(-view.getWidth()).alpha(0f); adapter.remove(tasks.get(i)); adapter.notifyDataSetChanged(); } }); It does not work. I basically followed the advice of the 4th answer from the top of this post: How to Animate Addition or

Android Flicker when using Animation and onAnimationEnd Listener

我们两清 提交于 2019-12-20 06:48:34
问题 I have 3 ImageButtons which are animated when Filling to left, like this: public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { ImageButton top; ImageButton left; ImageButton right; top = meMap.get("top"); left = meMap.get("left"); right = meMap.get("right"); goLeft = new TranslateAnimation(0, -(top.getLeft() - left.getLeft()), 0, -(top.getTop() - left.getTop())); goRight = new TranslateAnimation(0, -(left.getLeft() - right.getLeft()), 0, -(left.getTop() -

Rotating FloatingActionButton

别来无恙 提交于 2019-12-20 06:21:05
问题 I believe most of you all have seen the rotating FloatingActionButton in apps such as Google keep, push bullet and even Google inbox app. I am trying to achieve this rotation by having an animation file that is : <?xml version="1.0" encoding="UTF-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:fromDegrees="0" android:toDegrees="135" android:pivotX="50%" android:pivotY="50%" android:repeatCount="0" android:fillAfter="true" android:fillEnabled="true" android

How can I repeat a property animation?

℡╲_俬逩灬. 提交于 2019-12-19 17:38:33
问题 I'm doing an animation of bubbles on the screen, but the bubbles stop after finishing the animation time. How do I repeat the animation or make it infinite? bub.animate(); bub.animate().x(x2).y(y2); bub.animate().setDuration(animationTime); bub.animate().setListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { animators.add(animation); } @Override public void onAnimationRepeat(Animator animation) { } @Override public void onAnimationEnd(Animator

How to get a circle to display only once for the animation

六月ゝ 毕业季﹏ 提交于 2019-12-19 11:05:20
问题 I have an app that displays multiple circles and animates the radius from 0 to 300. The problem I am having is that it displays multiple circles slowly increasing the radius with each circle. I want only one circle drawn that increases the radius. Here is my code. public class SplashLaunch extends View{ Handler cool = new Handler(); DrawingView v; Paint newPaint = new Paint(); int randomWidthOne = 0; int randomHeightOne = 0; private float radiusOne = 300; final int redColorOne = Color.RED;

How to achieve uniform velocity throughout a Translate Animation?

被刻印的时光 ゝ 提交于 2019-12-19 10:26:18
问题 I have an infinite translate animation applied to an ImageView : Animation animation = new TranslateAnimation(0, 0, -500, 500); animation.setDuration(4000); animation.setFillAfter(false); myimage.startAnimation(animation); animation.setRepeatCount(Animation.INFINITE); What I have noticed is that the translation process is slower when the image is near the starting and ending point compared to when its near half the distance (middle point). I guess the velocity for translate animations on

How to reset ObjectAnimator to it's initial status?

本秂侑毒 提交于 2019-12-19 05:32:22
问题 I want to vibrate a view with scaleX and scaleY, and I am doing it with this code, but the problem is that sometimes the view is not correctly reset, and it shows with the scale applied... I want that when the animation ends, the view must be seen with its original status always this is the code: ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 1f, 0.9f); scaleX.setDuration(50); scaleX.setRepeatCount(5); scaleX.setRepeatMode(Animation.REVERSE); ObjectAnimator scaleY =

Android Property Animation

 ̄綄美尐妖づ 提交于 2019-12-19 05:22:17
问题 <objectAnimator android:propertyName="string" android:duration="int" android:valueFrom="float | int | color" android:valueTo="float | int | color" android:startOffset="int" android:repeatCount="int" android:repeatMode=["repeat" | "reverse"] android:valueType=["intType" | "floatType"]/> Ok I am learning some Animation in android. I got it from Google Developer Docs two attributes that actually I am not able to understand are android:propertyName="string" android:valueType=["intType" |