@SuppressWarnings("deprecation")
  public void onActivityCreate() {
    mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    mActivity.getWindow().getDecorView().setBackgroundDrawable(null);
    mSwipeBackLayout =
        (SwipeBackLayout) LayoutInflater.from(mActivity).inflate(R.layout.swipeback_layout, null);
    mSwipeBackLayout.addSwipeListener(
        new SwipeBackLayout.SwipeListener() {
          @Override
          public void onScrollStateChange(int state, float scrollPercent) {}

          @Override
          public void onEdgeTouch(int edgeFlag) {
            Utils.convertActivityToTranslucent(mActivity);
          }

          @Override
          public void onScrollOverThreshold() {}
        });
  }
 /**
  * Register a callback to be invoked when a swipe event is sent to this view.
  *
  * @param listener the swipe listener to attach to this view
  * @deprecated use {@link #addSwipeListener} instead
  */
 @Deprecated
 public void setSwipeListener(SwipeListener listener) {
   addSwipeListener(listener);
 }