Android 了解自定义包的XML属性
我正在尝试使用这个优秀项目中的拖放功能: 首先,我使用添加了库 第二,我正在尝试使用。这是我的main.xml:Android 了解自定义包的XML属性,android,android-xml,android-2.1-eclair,Android,Android Xml,Android 2.1 Eclair,我正在尝试使用这个优秀项目中的拖放功能: 首先,我使用添加了库 第二,我正在尝试使用。这是我的main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.ds
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.dslv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<include layout="@layout/header"/>
<com.mobeta.android.dslv.DragSortListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#D9D9D9"
android:dividerHeight="2dp"
android:listSelector="@drawable/list_selector"
dslv:drag_enabled="true"
dslv:drag_scroll_start="0.33"
dslv:drag_start_mode="onDown"/>
</LinearLayout>
但是,Eclipse抛出了这个错误:在包'com.mobeta.android.dslv'中找不到属性'drag_enabled'的资源标识符代码>类似于“拖动滚动开始”和“拖动开始模式”
我想从更一般的层面上理解我在这里做错了什么。如果有人能为我提供使用此库的具体帮助,我也将不胜感激。因为您正在引用库的属性,而不是给出库的完整路径,请给出“res auto”
请看一下零钱
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dslv="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<include layout="@layout/header"/>
<com.mobeta.android.dslv.DragSortListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#D9D9D9"
android:dividerHeight="2dp"
android:listSelector="@drawable/list_selector"
dslv:drag_enabled="true"
dslv:drag_scroll_start="0.33"
dslv:drag_start_mode="onDown"/>
应该可以,但是,尝试将文件复制到您的/res/values
。是否添加了github中列出的所有XML属性?