CircleIndicator icon indicating copy to clipboard operation
CircleIndicator copied to clipboard

the customize widget can't display in the xml file

Open zhouqitong opened this issue 8 years ago • 3 comments

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

zhouqitong avatar Jun 27 '16 07:06 zhouqitong

这个需要在代码中attach到一个ViewPager才行,不然CircleIndicator并不知道有多少个item,参见https://github.com/THEONE10211024/CircleIndicator/issues/3

THEONE10211024 avatar Jun 27 '16 07:06 THEONE10211024

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

zhouqitong avatar Jun 27 '16 07:06 zhouqitong

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

THEONE10211024 avatar Jun 28 '16 03:06 THEONE10211024