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); }
public void mediaHorizontalOffset(int offset) { viewer.setTranslationX(offset); }