RollBack a Transition Drawable on Background Android

Fonouckundort

New Member
I have a code witch active a Transition Drawable when you click a Button, the problem is, that i need to change that transition when the app is running. i need to show theese combination of gradients: "blue_gradient - green gradient - blue_gradient" OR "blue_gradient - red gradient - blue_gradient" to make a little colored-flash effect on the screen. So here i'm going to put witch ideas i tried and witch problem i had.1- Try to reverse the transition with\[code\]correctTransition.startTransition(300);correctTransition.resetTransition();\[/code\]2- when i try to get a new transition with y get a very big and pretty CAST EXCEPTION (and yes, transition2.xml is a Transition Object)layout.setBackgroundResource(R.drawable.transition2 );transition = (TransitionDrawable)layout.getBackground():3- I try to put the reverse of the transition, i mean, "green gradient - blue_gradient" and at the begining start the transition with transition.start(0); this thing works when the app is running, but at the start i see the green color about 200ms more or less, i tried to do the transition while the layout is with View.GONE.if you know a better way to show a gradient 300ms more or less and hat way could be able to change that gradient while the app is running, if you want some specific code please just ask for it. If i put here all the code maybe i put the server down :PThank you so much in advance!!!
 
Back
Top