Code Monkey home page Code Monkey logo

Comments (13)

razerdp avatar razerdp commented on June 15, 2024

@ping999 好的,我稍后看看

from basepopup.

razerdp avatar razerdp commented on June 15, 2024

@ping999 请问您用的是哪个版本

from basepopup.

 avatar commented on June 15, 2024

你好!用的是v1.3.0

from basepopup.

razerdp avatar razerdp commented on June 15, 2024

@ping999 ok了,更新到1.4.3试试

from basepopup.

razerdp avatar razerdp commented on June 15, 2024

@ping999 如果更新后没问题,这个issue由您关闭了哦

from basepopup.

 avatar commented on June 15, 2024

好的,感谢!

from basepopup.

razerdp avatar razerdp commented on June 15, 2024

不用-V- 如果有什么改进意见或者bug,欢迎继续提issue

from basepopup.

 avatar commented on June 15, 2024

-,还是有这个BUG额

from basepopup.

razerdp avatar razerdp commented on June 15, 2024

是这样的,setOnDismissListener在你设置过一次之后,该callback就被传递进去了,从你的代码上看,似乎是想tl_info.isIsSuccessful()的时候才执行。

但是,问题在于如果你有一次成功了,callback被设置进去了,但是下一次没有成功,如果popup被dismiss了,由于callback的存在,所以依然会回调回去的。

因此在你不需要的时候,你应该setOnDismissListener(null);

from basepopup.

 avatar commented on June 15, 2024

OK,感谢,这样可行

from basepopup.

 avatar commented on June 15, 2024

那我把这个issue关咯

from basepopup.

razerdp avatar razerdp commented on June 15, 2024

这里按照我的想法,提供两个方法,您可以试试

方法1

    public void onSuccess(String s, Call call, Response response) {
        TL_info tl_info = GsonUtilsZcyke.GsonToBean(s, TL_info.class);
        netLoadingPopup.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
            @Override
            public void onDismiss() {
                if (tl_info.isIsSuccessful()){
                    startActivityAnim(HWStreamActivity.class);
                }else{
                    showToast("初始化失败,请重试");
                }
            }
        });

    }

方法2

    public void onSuccess(String s, Call call, Response response) {
        TL_info tl_info = GsonUtilsZcyke.GsonToBean(s, TL_info.class);
        if (tl_info.isIsSuccessful()) {
            netLoadingPopup.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
                @Override
                public void onDismiss() {
                    startActivityAnim(HWStreamActivity.class);
                }
            });
        } else {
            netLoadingPopup.setOnDismissListener(null);
            showToast("初始化失败,请重试");
        }
    }

from basepopup.

razerdp avatar razerdp commented on June 15, 2024

好的

from basepopup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.