New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can`t close the window #3
Comments
Yes i have same problem too. Pls fix it if u can) |
This Problem fixed:
because |
@ModirGithub Sorry can you explain how to fix it? |
Hi
overwrite this method :
public boolean close(final boolean withScaleDown) { if (blackOverlay !=
null) { final Handler handler = new Handler(); handler.postDelayed(new
Runnable() { @OverRide public void run() { try{ if(blackOverlay!=null){
activityView.removeView(blackOverlay); blackOverlay = null;}
if(popupView!=null){ activityView.removeView(popupView); popupView = null;}
}catch (Exception e){} handleClick = false; } }, 350); handleClick = false;
final Listeners.End clearListener = new Listeners.End() { @OverRide public
void onEnd() { activityView.removeView(blackOverlay); blackOverlay = null;
activityView.removeView(popupView); popupView = null; isAnimating = false;
} }; isAnimating = true; if (withScaleDown) { float scaleX =
viewOrigin.getWidth() * 1.0f / (popupView.getWidth() *
ViewCompat.getScaleX(popupView)); float scaleY = viewOrigin.getHeight() *
1.0f / (popupView.getHeight() * ViewCompat.getScaleY(popupView)); float
translationX; float translationY; if (center) { translationX = 0;
translationY = 0; } else { translationX =
ViewCompat.getTranslationX(popupView); translationY =
ViewCompat.getTranslationY(popupView) - getStatusBarHeight(); } float
xViewOrigin = getX(viewOrigin); float yViewOrigin = getY(viewOrigin); float
xPopupView = getX(popupView); float yPopupView = getY(popupView) -
getStatusBarHeight(); float tx = 0; if (xViewOrigin < xPopupView) { tx =
xPopupView - xViewOrigin; } else { // xViewOrigin > xPopupView tx =
xViewOrigin - xPopupView; } if (center) { tx *= (1f - scaleX); }
translationX += tx; float ty = 0; if (yViewOrigin < yPopupView) { ty =
yPopupView - yViewOrigin; } else { // yViewOrigin > yPopupView ty =
yViewOrigin - yPopupView; } if (center) { ty *= (1f - scaleY); }
translationY += ty; DurX.putOn(popupViewContent) .animate() .alpha(0f)
.duration(closeDuration) .andAnimate(popupView) .scaleX(scaleX)
.scaleY(scaleY) .alpha(0f) .translationX(translationX)
.translationY(translationY) .duration(closeDuration)
.andAnimate(blackOverlay) .alpha(0f) .duration(closeDuration)
.end(clearListener) ; } else { DurX.putOn(blackOverlay) .animate()
.alpha(0) .duration(closeDuration) .thenAnimate(popupViewContent) .alpha(0)
.duration(closeDuration) .end(clearListener); } return true; } return
false; }
…On Sat, Aug 5, 2017 at 12:58 PM, coolmyll ***@***.***> wrote:
@ModirGithub <https://github.com/modirgithub> Sorry can you explain how
to fix it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AQGsRLB2X-bF24sMQ8F3CPpJeupBECndks5sVCe6gaJpZM4Ijz1G>
.
|
Lot of unknown entities suck as blackoverlay etc even if i override the method. If you have a spare moment @ModirGithub and want to help a fellow developer my mail is cool_myll@hotmail.com |
Hello! You did a great job, this library is delicious!
Unfortunately, I have a problem. If I open and close the popup window several times, the next window on what does not react. I can not close it. I very much hope that you can help solve this problem..
popup = MaryPopup.with(this.getActivity()) .cancellable(true) .draggable(true) .scaleDownDragging(true) .center(true) .blackOverlayColor(Color.parseColor("#DD444444")) .backgroundColor(Color.parseColor("#EFF4F5"));
Thanks! And sorry for my English!
The text was updated successfully, but these errors were encountered: