android-animation

Android Activity Transition Animation

≡放荡痞女 提交于 2019-12-18 11:12:33
问题 What I am trying to achieve is : start a new activity with a transition animation for the exiting activity only . I would like to slide up the current activity, where the new activity will be behind the current one. Here is the slide up animation : R.layout.slide_up <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:duration="1000" android:fromYDelta="0%" android:toYDelta="100%" /> </set> Here is how I am applying the activity animation transition :

Animation fade in and out

怎甘沉沦 提交于 2019-12-18 10:50:31
问题 Using this code I only have a fade in, I'm looking for how to add a fade out as well. I've added another xml called "fadeout" but I can't integrate it in my code. ImageView imageView = (ImageView)findViewById(R.id.imageView); Animation fadeInAnimation = AnimationUtils.loadAnimation(this, R.anim.fadein); imageView.startAnimation(fadeInAnimation); button1.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { imageView.startAnimation(fadeInAnimation); } } fadein.xml <?xml

kinds of animation techniques in android? [closed]

不羁岁月 提交于 2019-12-18 10:44:59
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . what are kinds of animation techniques in android? can u tell me the example codes, tutorials for that? Note: tween and frame animation in the documentation is not enough..... 回答1: Basically, besides the (fairly painful) frame/tween animations there are layout animations, view animations and transition

Scale & Translate animation

偶尔善良 提交于 2019-12-18 10:33:31
问题 I require an animation for an image in my application. The image should start coming from the top left corner till the middle of screen. The image size will be smaller at the initial stage. While coming to the middle of the screen, its size should increase(i.e. scaling should take place). Image should not go back to its original position. It should be placed at the middle of the screen itself after the animation. Can anyone please help. 回答1: Please find the answer here. Create an xml inside

ListView item scroll animation (“UIKit Dynamics” -like)

怎甘沉沦 提交于 2019-12-18 09:54:38
问题 I am attempting to animate the ListView items when a scroll takes place. More specifically, I am trying to emulate the scroll animations from the iMessage app on iOS 7. I found a similar example online: To clarify, I'm trying to achieve the "fluid" movement effect on the items when the user scrolls, not the animation when a new item is added. I've attempted to modify the Views in my BaseAdapter and I've looked into the AbsListView source to see if I could somehow attach an

Animation glitches while rendering on SurfaceView

旧城冷巷雨未停 提交于 2019-12-18 09:49:12
问题 The FPS is around 60, but the animation still glitches sometimes. I did threads profiling and discovered that on Samsung S4 or Samsung S3 lockCanvas() could take up to 20ms sometimes. Is there any specific reason for it? How to avoid such glitches. 回答1: Some devices, particularly those based around qcom CPUs, will aggressively manage power by lowering clocks, so you will see occasionally glitches in 60fps animation when your finger isn't actively moving across the touchscreen. The best way to

View Pager with previous and next item smaller in size with infinite scroll

家住魔仙堡 提交于 2019-12-18 09:15:09
问题 Want to create the view pager same as following UI, applied custom transformer but not working. ViewPager.java public class MyViewPager extends ViewPager implements ViewPager.PageTransformer { public static final String TAG = "MyViewPager"; private float MAX_SCALE = 0.0f; private int mPageMargin; private boolean animationEnabled=true; private boolean fadeEnabled=false; private float fadeFactor=0.5f; public MyViewPager(Context context) { this(context, null); } public MyViewPager(Context

Pause and Resume Translate Animation

假如想象 提交于 2019-12-18 05:17:35
问题 I am using Translate Animation for moving an ImageView . I am using this code: TranslateAnimation set1 = new TranslateAnimation(-4, 10, -110, 0); set1.setDuration(3000); TranslateAnimation set2 = new TranslateAnimation(10, -3, 0, 115); set2.setDuration(3000); set2.setStartOffset(2200); TranslateAnimation set3 = new TranslateAnimation(-3, -20, 0, -100); set3.setDuration(3000); set3.setStartOffset(4500); TranslateAnimation set4 = new TranslateAnimation(0, 13, 0, -120); set4.setDuration(3000);

Android, setVisbility to gone not working in RelativeLayout

血红的双手。 提交于 2019-12-18 04:14:50
问题 I am using a RelativeLayout to put a rotating spinner animation on top of a placeholder image while the real image is being loaded in a background thread. When the real bitmap is ready, the code below is run with in the UI thread with Activity.runOnUiThread(Runnable) The problem is, that all my attempts to hide the rotating image after the real image was loaded seem to fail. I got it working finally by bringing the underlying imageview to the front, but I'm just curious why setVisibility(View

android lollipop animation glitch

丶灬走出姿态 提交于 2019-12-18 03:59:07
问题 I have a strange behaviour with the default layout animation in devices running Android 5 (Lollipop). I am using an activity with multiple Fragments which are replaced at runtime using the default fragment manager. When replacing the old fragment, i want to use an animation for a smooth ui flow. On pre-lollipop devices the animation works like expected, but on devices running the latest os, the animation between fragment glitches: I tried using the default animation xml tag android