0

Do you know how to activate all animation from settings Menu in Android ? The problem is that the device, at least in the case of Samsung Galaxy, has to have animations enabled for transitive animation to work. This can be done in the settings menu but i want my application to do it programatically. is this possible ?

Dimitri
  • 677
  • 3
  • 19
  • 46
  • http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCsQFjAA&url=http%3A%2F%2Fwww.vogella.com%2Farticles%2FAndroidAnimation%2F&ei=bd-MUdWkDczqrQeHgoHIDA&usg=AFQjCNG15n-MMCOC_0lAyYkvgoJgZHcY3A&bvm=bv.46340616,d.bmk&cad=rja may help – Sam May 10 '13 at 11:56
  • Thanks but i need to turn animation from device settings on and off from my application – Dimitri May 10 '13 at 12:01

1 Answers1

1

I think this may work:

ContentResolver contentResolver = getContentResolver();
Settings.System.putInt(contentResolver , Settings.System.WINDOW_ANIMATION_SCALE, 0);

see this

Sam
  • 1,124
  • 1
  • 8
  • 12
  • should i implement it in each activity ? it force close my application – Dimitri May 10 '13 at 12:21
  • yeah @Dimitri bcoz i just learn from this http://stackoverflow.com/questions/6972295/switching-activities-without-animation.. – Sam May 10 '13 at 12:29
  • if u have another idea for this..plz tell me – Sam May 10 '13 at 12:37
  • yes i tried using style, but same issue. i guess i have to do it programmatically. it works with layout but hasn't tried yet with activity – Dimitri May 10 '13 at 12:52