GithubHelp home page GithubHelp logo

Comments (14)

gndegithub avatar gndegithub commented on June 3, 2024

大哥被你这个bug坑苦了,一天后台一千多个崩溃日志

from slideback.

oubowu avatar oubowu commented on June 3, 2024

实验性质的东西。。。

from slideback.

gndegithub avatar gndegithub commented on June 3, 2024

这个问题有没有解决办法啊,麻烦给指导一下,无奈了,快被骂哭了

from slideback.

oubowu avatar oubowu commented on June 3, 2024

把奔溃场景描述下 我复现下 然后看看如何解决吧 现在在上班中

from slideback.

gndegithub avatar gndegithub commented on June 3, 2024

我这边还没能复现,出错代码在上面了helper.getPreActivity()返回的是null。应该是activity管理栈出的问题,获取上级页面的时候是null

from slideback.

gndegithub avatar gndegithub commented on June 3, 2024

这是错误日志
1Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Window android.app.Activity.getWindow()' on a null object reference
2 at com.okbuy.android.ui.component.slideback.SlideBackHelper.getDecorView(SlideBackHelper.java:22)
3 at com.okbuy.android.ui.component.slideback.SlideBackHelper.getContentView(SlideBackHelper.java:30)
4 at com.okbuy.android.ui.component.slideback.SlideBackHelper.attach(SlideBackHelper.java:54)
5 at com.okbuy.android.ui.product.ProductDetailActivity.slideBack(ProductDetailActivity.java:470)

from slideback.

oubowu avatar oubowu commented on June 3, 2024

`
public static SlideBackLayout attach(@nonnull final Activity curActivity, @nonnull final ActivityHelper helper, @nullable final SlideConfig config, @nullable final OnSlideListener listener) {

    if (helper.getPreActivity()==null){
        // 内存不足应用被杀的话,直接返回一个空实现的SlideBackLayout,这时候滑动功能就失效了
        return new SlideBackLayout(curActivity);
    }

`

from slideback.

oubowu avatar oubowu commented on June 3, 2024

只能这样处理了,内存不足被杀的话,直接返回空实现待SlideBackLayout,没有将其添加到decorView,这个时候在内存回收重新创建当前activity的时候滑动返回功能就失效了

from slideback.

gndegithub avatar gndegithub commented on June 3, 2024

1,这样添加,不知为何会影响下面代码布局,控件的实例化。
NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference

2,现在不太确定是不是内存不足的问题,我看听云日志,内存使用情况。会不会是activity栈管理的问题?
能加一下qq吗,我的813196526,非常紧急~

from slideback.

oubowu avatar oubowu commented on June 3, 2024

你看下我提交的代码 应该你没有跟我那样处理好

from slideback.

gndegithub avatar gndegithub commented on June 3, 2024

非常感谢,这样目前没问题了。还有现在不太确定是不是内存不足的问题,我看听云日志,内存使用情况。会不会是activity栈管理的问题?

from slideback.

oubowu avatar oubowu commented on June 3, 2024

不清楚 你那个bug 我重现了下 内存不足被杀会发生 其他情况不得知

from slideback.

oubowu avatar oubowu commented on June 3, 2024

滑动方案最稳定的还是透明主题那种形式的库吧 这个作者写的很优秀
你可以看下 https://github.com/bingoogolapple/BGASwipeBackLayout-Android

from slideback.

gndegithub avatar gndegithub commented on June 3, 2024

谢了,我已经入坑太深了,项目很多地方改动比较多,在替换方案就很麻烦了。

from slideback.

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.