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

the customize widget can't display in the xml file #8

Open
zhouqitong opened this issue Jun 27, 2016 · 3 comments
Open

the customize widget can't display in the xml file #8

zhouqitong opened this issue Jun 27, 2016 · 3 comments

Comments

@zhouqitong
Copy link

运行app 是正常的,但是在xml文件中无法正常显示,报错如下:
“Rendering Problems onLayout error java.lang.IllegalStateException: forget to create movingItem?”

@THEONE10211024
Copy link
Owner

这个需要在代码中attach到一个ViewPager才行,不然CircleIndicator并不知道有多少个item,参见#3

@zhouqitong
Copy link
Author

但是每次调整xml布局的时候,必须先将该CircleIndicator 注释掉,才能预览整个xml布局效果,这样有点麻烦!不知道有没有好的解决办法!

@THEONE10211024
Copy link
Owner

简单点的改法是在CircleIndicator.java 的layoutMovingItem()方法中用一个温和点的方式报错,而不是直接抛出异常,应该就可以

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