Left to rigt animation effect ontouch not working in android -


i have made application in android,i made 2 activites in , ontouch event want swipe effect in code below not working,my code below,please me it:

effect.java

package com.effects.pageeffects;  import android.os.bundle; import android.app.activity; import android.content.intent; import android.content.pm.featureinfo; import android.view.menu; import android.view.motionevent; import android.view.view; import android.view.view.onclicklistener; import android.view.view.ontouchlistener; import android.widget.button;  public class effectsactivity extends activity implements ontouchlistener{     button b1;      @override     protected void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_effects);         }        @override         public boolean ontouch(view v, motionevent event) {             // todo auto-generated method stub             startactivity(new intent(effectsactivity.this, page2activity.class));              // set transition -> method available android 2.0 , beyond             overridependingtransition(r.anim.left_to_rigth, r.anim.rigth_to_left);             return true;          }  } 

write overridependingtransition(r.anim.left_to_rigth, r.anim.rigth_to_left); in oncreate() method of page2activity after setcontentview() method.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -