Android Slide in and out animation issue -


my activity slide in android 4.1 activity 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="600" /> </set> 

and in activity used overidding pending transition shown below:

a.this.overridependingtransition(r.anim.outanimation,r.anim.inanimation);

as said earlier works fine on android 4 , above platform when test on android 2.3 platform, activity b gets android default activity animation.

how can run activity slide left right , right left compatible 2.2 , above.

is there way set animation between 2 activities programmatically ?

update

the problem device, @ least in case of samsung galaxy, has have animations enabled work. can done in settings menu.

do know how activate animation settings menu in android ?

for android slide in , out animation, have use following code.

activity :

intent intnt = new intent(splashscreen.this,                         customtabactivity.class);                 startactivity(intnt);                 overridependingtransition(r.anim.slide_in_left,                         r.anim.slide_out_left);                 finish(); 

slide_in_left.xml

<?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android"     android:duration="@android:integer/config_longanimtime"     android:fromxdelta="100%p"     android:toxdelta="0%p" /> 

slide_out_left.xml

<?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android"     android:duration="@android:integer/config_longanimtime"     android:fromxdelta="0"     android:toxdelta="-100%p" /> 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -