android-animation

Setting style android:windowIsTranslucent seems to conflict with windowAnimationStyle

送分小仙女□ 提交于 2020-01-14 03:21:08
问题 I have the following style on in my style.xml and is a follow up to my question here Activity transition effects: slide in for the top activity and scale for the bottom activity: <style name="RevealTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowAnimationStyle">@style/ActivityAnimation</item> </style> <style name="ActivityAnimation" parent="

android transition

瘦欲@ 提交于 2020-01-13 18:15:09
问题 I am using the following code to set an animation between 2 images for my SplashScreen: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.splash); // Show A Transitions for Splash image here. TransitionDrawable transition = (TransitionDrawable) getResources() .getDrawable(R.drawable.splash_animation); //Set interval for the transition between two image. transition.startTransition(5000); //Fetch imageView from your layout and apply

how to solve OutOfMemoryError in android?

徘徊边缘 提交于 2020-01-13 11:45:14
问题 I have prepared no.of drawable animations.when application launch first animation will be start.i have two buttons(next and previous) with same activity.when i click on next button i got exception like, java.lang.OutOfMemoryError: bitmap size exceeds VM budget My code is, For getting drawable animations from drawable, private void getAnimationForLetters(int mAnim) { // TODO Auto-generated method stub String anim = "capital_anim_" + new Integer(mAnim).toString(); final int resID =

Android draw circle with Path

随声附和 提交于 2020-01-13 10:22:16
问题 I'm trying to animate drawing out a circle. In my custom view, I have private final Paint mPaint = new Paint() { { setDither(true); setStyle(Paint.Style.STROKE); setStrokeCap(Paint.Cap.ROUND); setStrokeJoin(Paint.Join.ROUND); setColor(Color.BLUE); setStrokeWidth(30.0f); setAntiAlias(true); } }; ... protected void onDraw(Canvas canvas) { super.onDraw(); if (mOval == null) { mOval = new RectF(getLeft(), getTop(), getRight(), getBottom()); } if (mPath == null) { mPath = new Path(); mPath.moveTo

How to use default animations in Android?

老子叫甜甜 提交于 2020-01-13 08:33:12
问题 I'm trying to use the default animations for the Activity with fragments.. here I found something about it: Android: using Activity's default animation for Fragments the problem is: ok, I need (for example) "activityOpenEnterAnimation".. how can I use it? Using the following code won't work: FragmentTransaction transaction = fragmentManager.beginTransaction(); transaction.setCustomAnimations(android.R.anim.activityOpenEnterAnimation, android.R.anim.activityOpenExitAnimation); transaction

Possible to jump straight to second view in ViewAnimator

三世轮回 提交于 2020-01-13 07:48:07
问题 I have a ViewAnimator ( ViewSwitcher to be precise) with fade in/out animations associated to it and two Views which I transition between using the ViewAnimator.showNext() and ViewAnimator.showPrevious() methods. There is a requirement in my app where sometimes I need to start straight from the second View , without showing a fade animation in going from the first View to the second. Anyone know if there is a straightforward way to accomplish this without having to mess around with the in/out

Flipping and changing image in ImageView

ぃ、小莉子 提交于 2020-01-13 04:12:47
问题 I am working on a App that is simple in work and it is working quite efficiently. But I have one place where I am looking something is not looking great and that is flipping Animation. What I Want : I have a Button and a ImageView beneath the button. On a Button click I want to make a Animation that it looks like ImageView has flipped and next image is shown in the ImageView. So on every click it should show next image with a flipping animation but there are some problems. I would discuss

animation.start() or animation.startNow() does not start the animation immediately

对着背影说爱祢 提交于 2020-01-12 20:54:14
问题 I have a strange issue - from time to time the animation that should fade out my control (ImageButton) does not kick in immediately. I am using the fadeout animation to hide it and then in myListener on its end (onAnimationEnd) I put new resource as the image on the button. Somewhere in my app code: Animation a = AnimationUtils.loadAnimation(this,R.anim.fadeout); a.setAnimationListener(new myListener(location)); buttons[location].setAnimation(a); a.startNow(); // regardless if its start() or

Android Slide in and out animation issue

故事扮演 提交于 2020-01-12 10:45:11
问题 My Activity Successfully slide in android 4.1 from Activity A to B using animation **inamation.xml** <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromXDelta="100%" android:toXDelta="0%" android:duration="600" /> </set> and outanimation.xml <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android"> <translate android:fromXDelta="100%" android:toXDelta="0%" android:duration

Button animations in android

我的梦境 提交于 2020-01-12 10:43:21
问题 Good day, everyone! Today I got, as I suppose, very interesting question. On my job we are creating a dating service and one of the main features will be the screen, where photos of different girls( or guys) are shown and the user press either "Hot" or "Not" button. Both of these buttons are displayed below the photo on the screen. Our analytics say (god "bless" them...) that we should implement some kind of "gaming" mechanics, so the want such a thing: when user press, for example, "Not"