diff options
Diffstat (limited to 'CompactPanel/src/co/potatoproject')
| -rw-r--r-- | CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java b/CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java index f474b9d..76fbcbe 100644 --- a/CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java +++ b/CompactPanel/src/co/potatoproject/plugin/volume/compact/VolumeDialogImpl.java @@ -374,15 +374,15 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { internalInsetsInfo.setTouchableInsets(InternalInsetsInfo.TOUCHABLE_INSETS_REGION); View main = mDialog.findViewById(R.id.main); int[] mainLocation = new int[2]; - main.getLocationOnScreen(mainLocation); - internalInsetsInfo.touchableRegion.set(new Region( + main.getLocationInWindow(mainLocation); + internalInsetsInfo.touchableRegion.set( mainLocation[0], mainLocation[1], mainLocation[0] + main.getWidth(), mPanelMode == PanelMode.MINI ? mainLocation[1] + main.getHeight() : mainLocation[1] + mDialogView.getHeight() - )); + ); }; protected ViewGroup getDialogView() { @@ -906,7 +906,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { } initSettingsH(); - mDialog.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsListener); + mDialog.getViewTreeObserver().addOnComputeInternalInsetsListener(mInsetsListener); if(!mShowing && !mDialog.isShown()) { mDialogView.setTranslationX(0); @@ -1006,6 +1006,7 @@ public class VolumeDialogImpl extends PanelSideAware implements VolumeDialog { if (!isLandscape() && mPanelMode != PanelMode.MINI) animator.translationX((mDialogView.getWidth() / 2.0f)*(isAudioPanelOnLeftSide() ? -1 : 1)); animator.start(); + mDialog.getViewTreeObserver().removeOnComputeInternalInsetsListener(mInsetsListener); checkODICaptionsTooltip(true); mController.notifyVisible(false); synchronized (mSafetyWarningLock) { |
