Exemplo n.º 1
0
  private void exitFullscreenAnimated(boolean animated) {
    if (!isVideoFullScreen()) return;

    swipeRefreshLayout.setVisibility(View.VISIBLE);

    // reset the values correctly
    viewer.setRotation(0.f);
    viewer.setScaleX(1.f);
    viewer.setScaleY(1.f);
    viewer.setTranslationX(0.f);

    // simulate scrolling to fix the clipping and translationY
    simulateScroll();

    // go back to normal!
    FragmentActivity activity = getActivity();
    activity.supportInvalidateOptionsMenu();

    if (activity instanceof ToolbarActivity) {
      // show the toolbar again
      ((ToolbarActivity) activity).getScrollHideToolbarListener().reset();
    }

    Screen.unlockOrientation(activity);
  }
Exemplo n.º 2
0
  @Override
  public void onDestroyView() {
    content.removeOnScrollListener(scrollHandler);

    // restore orientation if the user closes this view
    Screen.unlockOrientation(getActivity());

    adapter = null;

    super.onDestroyView();
  }