예제 #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);
  }
예제 #2
0
  private void realignFullScreen() {
    FullscreenParams params = new FullscreenParams();

    viewer.setTranslationY(params.trY);
    viewer.setScaleX(params.scale);
    viewer.setScaleY(params.scale);
  }