Skip to content
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

RecyclerView 界面异常 #74

Closed
5 tasks done
xiangxm opened this issue Nov 2, 2018 · 7 comments
Closed
5 tasks done

RecyclerView 界面异常 #74

xiangxm opened this issue Nov 2, 2018 · 7 comments

Comments

@xiangxm
Copy link

xiangxm commented Nov 2, 2018

Environment

  • Autosize Version: 1.0.1
  • Target Android Version: 27
  • Device Model: Pixel XL api28
  • Device Resolution:1080px * 1920px
  • Design Size On AndroidManifest: 360dp * 640dp

Bug Description:

在有RecyclerView 的界面,弹出输入法,在收回输入法,或者弹出输入法后,弹出一个toast此时收回输入法,看到recyclerView 只有三条item显示,并且上拉下拉是空白,会不断出现空白

Log:


2018-11-02 15:08:13.555 7689-7689/ D/AndroidAutoSize: ui.activity.user.JoinCompanyActivity used the global configuration.
2018-11-02 15:08:13.561 7689-7689/ D/AndroidAutoSize: The ui.activity.user.JoinCompanyActivity has been adapted! 
    JoinCompanyActivity Info: isBaseOnWidth = true, designWidthInDp = 360.000000, targetDensity = 4.000000, targetScaledDensity = 4.000000, targetDensityDpi = 640, targetXdpi = 4.000000
2018-11-02 15:08:13.686 7689-7689/ D/AndroidAutoSize: ui.activity.user.JoinCompanyActivity used the global configuration.
2018-11-02 15:08:13.692 7689-7689/D/AndroidAutoSize: The ui.activity.user.JoinCompanyActivity has been adapted! 
    JoinCompanyActivity Info: isBaseOnWidth = true, designWidthInDp = 360.000000, targetDensity = 4.000000, targetScaledDensity = 4.000000, targetDensityDpi = 640, targetXdpi = 4.000000

Screenshot

Related Code:

  

Others:

@xiangxm
Copy link
Author

xiangxm commented Nov 2, 2018

另外发现,在有列表的界面弹出软键盘,在收回容易出现列表异常。数据只有几条,recyclerview的其他区域都变成空白,还能不断上下拉伸

@JessYanCoding
Copy link
Owner

截图,画圈指出异常位置

@JessYanCoding
Copy link
Owner

JessYanCoding commented Nov 2, 2018

先确定停止框架或者不依赖框架是否还有相同问题,以确定是否是框架引起的问题,如果是框架的问题请参考这两个解决方案:
#59 #13 (comment)

@xiangxm
Copy link
Author

xiangxm commented Nov 2, 2018

我在监听了软键盘的弹出与消失位置重新做了适配。

KeyboardUtils.registerSoftInputChangedListener(this, new KeyboardUtils.OnSoftInputChangedListener() {
            @Override
            public void onSoftInputChanged(int height) {
                AutoSize.autoConvertDensityOfGlobal(JoinCompanyActivity.this);
            }
        });

@JessYanCoding
Copy link
Owner

对,这个方法就是万能解决方案,请问解决了吗

@xiangxm
Copy link
Author

xiangxm commented Nov 2, 2018

恩,已经解决。多谢!:)

@xiangxm
Copy link
Author

xiangxm commented Nov 20, 2018

@JessYanCoding 用这个方法在#84 也无法解决呢,提这个issue的目的是想进一步确认下是不是和框架内部有关系。 现在的处理方式是延迟200毫秒,等软键盘收回到再跳转。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants