引用开源项目JazzyAnimationLibrary做列表项动画插入时,在xml中添加列表控件配置时,报Unbound prefix.
<com.twotoasters.jazzylistview.JazzyListView
android:id="@+id/animation_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@null"
app:effect="helix"
app:only_animate_new_items="false"
app:only_animate_fling="false"
app:max_velocity="0">
该借点配置是从例子配置文件中拷过来,所以可以保证配置应该是没有问题的。查了度娘,报这个错误1、检查属性有没有拼写错误,如android有没有写成andorid。例子拷贝来的可确定不是这个问题
2、再查看配置,原来这个自定义控件有自定义属性,使用了app的命名空间。原来是在xml的根节点加入app这个命名空间才能解析。从例子xml中把app命名控件拷到该控件所在xml文件的根节点,即可。
xmlns:app="http://schemas.android.com/apk/res-auto"