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

计算方法过于复杂,容易导致绘制的时候创建过多的layout对象 #4

Open
7heaven opened this issue Jun 3, 2016 · 1 comment

Comments

@7heaven
Copy link

7heaven commented Jun 3, 2016

可以考虑使用DynamicLayout + 动态添加Span的方式来做,在需要给子控件让出空间的位置使用宽度可定但是不可见的Span来给Layout创建文字内部的间隔,这个整个布局内容复杂也不会导致计算和绘制时间的大幅度增加。甚至可以实现拖动子控件的动态排版。

@lovewysy
Copy link

lovewysy commented Aug 8, 2016

08-08 13:35:59.970: E/CrashHandler(3539): java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
08-08 13:35:59.970: E/CrashHandler(3539): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
08-08 13:35:59.970: E/CrashHandler(3539): at java.util.ArrayList.get(ArrayList.java:304)
08-08 13:35:59.970: E/CrashHandler(3539): at com.bsjvideo.notice.MixtureTextView.tryDraw(MixtureTextView.java:183)
08-08 13:35:59.970: E/CrashHandler(3539): at com.bsjvideo.notice.MixtureTextView.dispatchDraw(MixtureTextView.java:281)
两个错误 ,我在看我能不能改改再用。

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