title: Doing a push fragment animation
body: <p>How can I do a animation that pushes the current fragment by the next fragment </p>
  
  <p>Here is the Animation that I want:
  <img src="https://i.stack.imgur.com/utvzH.jpg" alt="enter image description here"></p>
  
  <p>My current animation code just overlaps the first fragment by the second fragment it didnt push it just like in the picture</p>
  
  <p>Here is the code:</p>
  
  <pre><code>result_list.setOnItemClickListener(new OnItemClickListener(){
  
              @Override
              public void onItemClick(AdapterView&lt;?&gt; av, final View view,
                       final int i, long i2) {
                  result_list.setEnabled(false);
                  view.animate().setDuration(300).translationX(widthListView).alpha(0).
                  withEndAction(new Runnable() {
                      @Override
                      public void run() {
                          //setResult(Activity.RESULT_OK,new Intent().putExtra("bussStopCode", data.get(i).getStopCode()).putExtra("bussStopName", data.get(i).getStopName()));
                          ////int get 1
                          //data.remove(i);
  
                          int temporaryInteger = i;
                          listLastPostion = temporaryInteger;
                          //customAdapter.notifyDataSetChanged();
                          //view.setTranslationX(0);
  
                          Log.d("data",conreq.getCollectedData().getBusRouteSetData().get(temporaryInteger - 1).getRouteHeading());
                          Bundle bundle = new Bundle();
                          bundle.putString("busdestination", conreq.getCollectedData().getBusRouteSetData().get(temporaryInteger-1).getRouteHeading());
                          bundle.putString("busnumber", conreq.getCollectedData().getBusRouteSetData().get(temporaryInteger-1).getRouteNo());
                          Fragment fragment = new FragmentNextTripForStop();
                          fragment.setArguments(bundle);
                          FragmentTransaction fragmentManager = getFragmentManager().beginTransaction();
                          fragmentManager.setCustomAnimations(R.anim.right_left_anim_x_left,R.anim.right_left_anim_x_right,R.anim.left_right_anim_x_left,R.anim.left_right_anim_x_right);
                          fragmentManager.add(R.id.fragment_searched_data_xml, fragment).addToBackStack(null).commit();
                         // finish();
                          //overridePendingTransition(R.anim.right_left_anim_x_left,R.anim.right_left_anim_x_right);
  
                      }
                  }); 
              }});
  </code></pre>