需要帮助来实现47degree Android的SwipeListView [英] Need help to implement 47degree Android-SwipeListView

查看:147
本文介绍了需要帮助来实现47degree Android的SwipeListView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要帮助来实现47degree Android的SwipeListView

库网址:

<一个href="https://github.com/47deg/android-swipelistview">https://github.com/47deg/android-swipelistview

全部功能完善的工作实例:

<一个href="https://play.google.com/store/apps/details?id=com.fortysevendeg.android.swipelistview">https://play.google.com/store/apps/details?id=com.fortysevendeg.android.swipelistview

问题:

每一次我尝试实施swipelistview在我的活动列表视图,我得到了新的问题。最后,我想包括编发JAR(<一href="https://oss.sonatype.org/content/groups/public/com/fortysevendeg/android/swipelistview/1.0-SNAPSHOT/">https://oss.sonatype.org/content/groups/public/com/fortysevendeg/android/swipelistview/1.0-SNAPSHOT/)我的项目并执行它;它编译正确的,但是当我试图在设备上运行,或AVD它崩溃与异常ClassNotFoundException异常的SwipeListViewTouchListener等等...

Every time I try to implement swipelistview in my activity listview I get new problems. Lastly I tried to include compiled and distributed JAR (https://oss.sonatype.org/content/groups/public/com/fortysevendeg/android/swipelistview/1.0-SNAPSHOT/) to my project and implement it; it was compiling correctly but when I was trying to run it on the device or avd it was crashing with exception ClassNotFoundException for SwipeListViewTouchListener and many more...

工具,我用?

Android的工作室

Android Studio

我需要什么?

我是(和许多开发人员四处寻找相同的解决方案)非常感激,如果有人能提供使用这个库非常简单的例子...

I would be (and many more developers looking around for same solution ) very grateful if someone can provide very basic example using this library...

  • 无需提供充分的工作类型的应用程序
  • 在演示code具有正面和背面视图列表视图项工作时左右滑动就可以了
  • 没有必要实施库的所有设置

这个问题的动机是让懂得如何线了47degree swipelistview库到你的应用,并使其正常工作。谁在使用它应该能够从API文档找到休息的事情程序员。

The motive of this question is to get idea about how to wire-up 47degree swipelistview library into your application and make it working. Rest things programmer who is using it should be able to find out from API documentation.

在这个任何帮助将是非常有用的,因为我的工作在一个小的应用程序,我想实现这样的功能。

Any help on this would be very useful as I am working on one small application where I want to implement such functionality.

推荐答案

最后,我成功地在自己的应用程序中集成47degree Android的SwipeListView。

工程就像一个魅力。由于47degree写这样一个奇妙的code。

Works like a charm. Thanks 47degree to write such a wonderful piece of code.

解决方法:

什么是不工作!?

What is not working!!?

包括JAR的依赖和attrs.xml在RES /值或引用的swipelistview库中的项目的lib依赖项目是行不通的。

Including JAR as dependency and attrs.xml in res/values OR referencing to the swipelistview library as lib dependency project in your project is not working.

什么工作!!?

What works!!?

包括以下类别为您的应用程序包同时正确的包中这些类的包名的名字

  • SwipeListView.java
  • SwipeListViewListener.java
  • SwipeListViewListenerBase.java
  • SwipeListViewTouchListener.java

包含下列XML到你的应用RES /值的文件夹。

  • attrs.xml

现在,您可以定义和使用SwipeListView如下:

<au.com.your.package.SwipeListView
        xmlns:swipe="http://schemas.android.com/apk/res-auto"
        android:id="@+id/swipe_listview"
        android:listSelector="#00000000"
        android:layout_width="match_parent"
        android:layout_height="match_parent"        
        swipe:swipeFrontView="@+id/front"
        swipe:swipeBackView="@+id/back"
        swipe:swipeActionLeft="reveal"
        swipe:swipeActionRight="choice"
        swipe:swipeMode="both"
        swipe:swipeCloseAllItemsWhenMoveList="true"
        swipe:swipeOpenOnLongPress="true"
        swipe:swipeAnimationTime="100"
        swipe:swipeOffsetLeft="50dp"
        swipe:swipeDrawableChecked="@drawable/item_selected"
        swipe:swipeDrawableUnchecked="@drawable/item_unselected"
   />

活动code为显示在SwipeListView github上的网站上的例子中,你可以使用相同的。

<一个href="https://github.com/47deg/android-swipelistview-sample/blob/master/src/main/java/com/fortysevendeg/android/swipelistview/sample/activities/SwipeListViewExampleActivity.java" rel="nofollow">https://github.com/47deg/android-swipelistview-sample/blob/master/src/main/java/com/fortysevendeg/android/swipelistview/sample/activities/SwipeListViewExampleActivity.java

您需要纠正上面从code部分进口。

You will need to correct some imports from the code above.

这篇关于需要帮助来实现47degree Android的SwipeListView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆