I wand to use OverridependingTransition in fragment but I am getting an error : Here is my code

med=(LinearLayout) getView().findViewById(R.id.second);

        med.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent i= new Intent(getContext(),SecondActivity.class);
                i.putExtra("table_name","questCompFunda");

                startActivity(i);
                overridePendingTransition(android.R.anim.slide_in_left,android.R.anim.slide_out_right);
            }
        });