how to apply slider animation on activity
<p>I want to apply slider animation in activity means when user click on button then the next screen will open with slider animation.</p>

<p><strong>TEST2Activity.java</strong></p>

<pre><code>public class TEST2Activity extends Activity {
    EditText dob;
    Button btn;
    SimpleDateFormat dateformat;
    Editable
    var;
    String str;

    /** Called when the activity is first created. */@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        //  isOnline();
        Date date = new Date();
        date.getDate();
        dateformat = new SimpleDateFormat("dd-mm-yyyy");
        dob = (EditText) findViewById(R.id.dob);


        btn = (Button) findViewById(R.id.button1);

        str = dob.getText().toString();
        System.out.println("date is string" + str);
        System.out.println("date is string");
        btn.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub
                try {

                    Intent intent = new Intent(TEST2Activity.this, CommentChangeActivity.class);

                    startActivity(intent);


                    overridePendingTransition(R.anim.myslideleft, R.anim.myslideright);
                } catch (Exception e) {
                    System.out.println("the error in date is" + e);
                }
            }
        });
    }

    public boolean isOnline() {
        ConnectivityManager cm = (ConnectivityManager) getSystemService(this.CONNECTIVITY_SERVICE);
        NetworkInfo ni = cm.getActiveNetworkInfo();
        boolean result = false;
        if (ni != null) {
            if (ni.getState() == NetworkInfo.State.CONNECTED) {
                result = true;
            }
        }
        System.out.println("the internet connected is:" + result);
        return result;

    }
}    
</code></pre>

<p><strong>CommentChangeActivity.java</strong></p>

<pre><code>public class CommentChangeActivity extends Activity {
    EditText showCategoryValue;
    EditText showItemValue;
    EditText showCommentValue;
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.myfile);
    }
} 
</code></pre>

<p><strong>slide in left xml</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;set xmlns:android="http://schemas.android.com/apk/res/android" &gt;

    &lt;translate
        android:duration="2000"
        android:fromXDelta="-50%p"
        android:toXDelta="0" /&gt;

    &lt;alpha
        android:duration="2000"
        android:fromAlpha="0.0"
        android:toAlpha="1.0" /&gt;

&lt;/set&gt;  
</code></pre>

<p><strong>slide in right xml</strong></p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;set xmlns:android="http://schemas.android.com/apk/res/android" &gt;

    &lt;translate
        android:duration="2000"
        android:fromXDelta="50%p"
        android:toXDelta="0" /&gt;

    &lt;alpha
        android:duration="2000"
        android:fromAlpha="0.0"
        android:toAlpha="1.0" /&gt;

&lt;/set&gt;
</code></pre>

<p>And In Activity Code :</p>

<pre><code>    startActivity(intent);
    overridePendingTransition(R.anim.slide_in_left, R.anim.slide_in_right);  


i have use this code but it doesn't work so please suggest me the solution of it.
helpers must be appreciated and thanks in advance. 
</code></pre>
