Hai Zhang

Results 404 comments of Hai Zhang

I'm hit by this as well - and I'm using `adb-sync` on Linux. The problem seems to be with the underlying `adb` implementation because I can't `adb push` files with...

It's actually a new restriction when using the FUSE backed emulated storage and the code is in [MediaProvider](https://cs.android.com/android/platform/superproject/+/master:packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java;l=6742;drc=f00c2d6c62b2c808a62d5f4c3db4c02a3719b2bd): ```java public int insertFileIfNecessaryForFuse(@NonNull String path, int uid) { ... if (!path.equals(getAbsoluteSanitizedPath(path)))...

Thanks~ I'll equip my app with this library immediately after the release : )

请问机型是什么?以及样例程序也会崩溃吗?

在 Pixel 4 XL Android 11 上运行 FastScroll Sample 一切正常,`FastScrollScrollView`、`FastScrollNestedScrollView`和`FastScrollWebView`都没有发生崩溃。可能和你的具体代码有关。你能使用样例程序来重现这个问题吗? 搜索了一下这个错误消息,和 Transition、过大的 wrap_content、硬件加速等都可能有关系。你可以看一看以下链接: - https://stackoverflow.com/questions/43748222/java-lang-illegalstateexception-unable-to-create-layer-for-v - https://stackoverflow.com/questions/63792063/java-lang-illegalstateexception-unable-to-create-layer-for-recyclerview - https://www.codeleading.com/article/77423991167/

错误的来源在 [`SkiaPipeline::createOrUpdateLayer`](https://cs.android.com/android/platform/superproject/+/master:frameworks/base/libs/hwui/pipeline/skia/SkiaPipeline.cpp;l=189;drc=5f9753d770549db9c65e4e13c1e297a7f5fd6791),调用 `node->getLayerSurface()` 返回了 `nullptr`,也就是说稍早时的 `SkSurface::MakeRenderTarget` 失败了。比较让人在意的是错误消息里的 `size: 0x1600`,你的代码里有宽度为 `0` 的控件吗? > Pending exception java.lang.IllegalStateException: Unable to create layer for View, size 0x1600 max size 8192 color type 4 has...

往 Skia 里看了几层,发现确实是 `width` 为 `0` 导致的问题,在 [`GrCaps::validateSurfaceParams`](https://cs.android.com/android/platform/superproject/+/master:external/skia/src/gpu/GrCaps.cpp;l=297;drc=master) 中 `dimensions.width() < 1` 会导致验证失败最终 `SkSurface::MakeRenderTarget` 失败。

@Hamza417 Thanks for this great observation! Yes, a `ColorDrawable` has an intrinsic width of `-1`, which would result in the manual layout code trying to layout with `left > right`...

@drakeet @liyujiang-gzu This may have been fixed by #39 and I've released 1.1.8. Could you check if this issue has been fixed?

`getFirstItemAdapterPosition` is also used for computing the scroll offset, so replacing it with methods like `findFirstCompletelyVisibleItemPosition` or `findLastVisibleItemPosition` will break fast scrolling. Even if we use a separate method for...