android swipelist缺少属性
我遇到了与此用户相同的问题: 但是,我在布局xml文件中正确键入了类的名称,并且在xml视图中没有给出任何错误,但是当我更改为图形布局视图时,我收到一个错误,错误是:android swipelist缺少属性,android,xml,layout,swipe,Android,Xml,Layout,Swipe,我遇到了与此用户相同的问题: 但是,我在布局xml文件中正确键入了类的名称,并且在xml视图中没有给出任何错误,但是当我更改为图形布局视图时,我收到一个错误,错误是: java.lang.RuntimeException: You forgot the attributes swipeFrontView or swipeBackView. You can add this attributes or use 'swipelist_frontview' and 'swipelist_backvie
java.lang.RuntimeException: You forgot the attributes swipeFrontView or swipeBackView.
You can add this attributes or use 'swipelist_frontview' and 'swipelist_backview'
identifiers
我添加了Nineodandroid和滑动列表罐
关于这方面有什么建议吗?您需要在您的列表中列出以下内容:
<?xml version="1.0" encoding="utf-8"?>
<com.fortysevendeg.android.swipelistview.SwipeListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:swipe="http://schemas.android.com/apk/res-auto"
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:listSelector="#00000000"
swipe:swipeActionLeft="dismiss"
swipe:swipeBackView="@+id/back"
swipe:swipeCloseAllItemsWhenMoveList="true"
swipe:swipeFrontView="@+id/front"
swipe:swipeMode="both" />
您需要在列表中列出以下内容:
<?xml version="1.0" encoding="utf-8"?>
<com.fortysevendeg.android.swipelistview.SwipeListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:swipe="http://schemas.android.com/apk/res-auto"
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:listSelector="#00000000"
swipe:swipeActionLeft="dismiss"
swipe:swipeBackView="@+id/back"
swipe:swipeCloseAllItemsWhenMoveList="true"
swipe:swipeFrontView="@+id/front"
swipe:swipeMode="both" />
将SwipeListView中的ID更改为 并在列表项视图中
...
...
帮我解决了这个问题。我认为这个bug某种程度上与这个pull请求有关将SwipeListView中的ID更改为 并在列表项视图中
...
...
帮我解决了这个问题。我认为这个bug与这个拉取请求有关,swipeListView有两个视图,分别是“FrontView”和“BackView” 尝试以下示例xml:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:id="@+id/back"
style="@style/ListBackContent"
android:layout_width="wrap_content"
android:layout_height="110dp"
android:tag="back" >
<LinearLayout
android:id="@+id/backshowportion"
style="@style/ListBackContent"
android:layout_width="250dp"
android:layout_height="110dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="right|center" >
<TextView
.... />
<TextView
.... />
<TextView
..../>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/front"
style="@style/ListFrontContent"
android:layout_width="match_parent"
android:layout_height="110dp"
android:orientation="vertical"
android:tag="front" >
<TextView
.... />
<TextView
.... />
<TextView
.... />
</RelativeLayout>
</FrameLayout>
swipeListView有两个视图,分别为“前视图”和“后视图” 尝试以下示例xml:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:id="@+id/back"
style="@style/ListBackContent"
android:layout_width="wrap_content"
android:layout_height="110dp"
android:tag="back" >
<LinearLayout
android:id="@+id/backshowportion"
style="@style/ListBackContent"
android:layout_width="250dp"
android:layout_height="110dp"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:gravity="right|center" >
<TextView
.... />
<TextView
.... />
<TextView
..../>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/front"
style="@style/ListFrontContent"
android:layout_width="match_parent"
android:layout_height="110dp"
android:orientation="vertical"
android:tag="front" >
<TextView
.... />
<TextView
.... />
<TextView
.... />
</RelativeLayout>
</FrameLayout>