【问题标题】:add new editable item to listview when pull the list down下拉列表时向列表视图添加新的可编辑项
【发布时间】:2014-08-28 08:53:17
【问题描述】:

请我需要做下拉列表相同的效果来添加新的空项并编辑它,当列表项失去焦点时它将被保存

请检查以下 android 应用程序以了解我想要做什么

https://play.google.com/store/apps/details?id=com.xuchdeid.clear&hl=en

如果有人知道我可以遵循的任何算法库,请告诉我。

【问题讨论】:

  • 在这其中一些功能是可能的,而且你们中的一些人与动画和一些库有关。

标签: android android-listview android-animation


【解决方案1】:

我找到了这个

https://github.com/47deg/android-swipelistview

https://www.youtube.com/watch?v=E0352OH488M!

image

>XML Usage

如果你决定使用 SwipeListView 作为视图,你可以在你的 xml 布局中定义它,如下所示:

<com.fortysevendeg.swipelistview.SwipeListView
        xmlns:swipe="http://schemas.android.com/apk/res-auto"
        android:id="@+id/example_lv_list"
        android:listSelector="#00000000"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        swipe:swipeFrontView="@+id/front"
        swipe:swipeBackView="@+id/back"
        swipe:swipeActionLeft="[reveal | dismiss]"
        swipe:swipeActionRight="[reveal | dismiss]"
        swipe:swipeMode="[none | both | right | left]"
        swipe:swipeCloseAllItemsWhenMoveList="[true | false]"
        swipe:swipeOpenOnLongPress="[true | false]"
        swipe:swipeAnimationTime="[miliseconds]"
        swipe:swipeOffsetLeft="[dimension]"
        swipe:swipeOffsetRight="[dimension]"
        />
  1. swipeFrontView - 必需 - 前视图 ID。
  2. swipeBackView - 必需 - 后视图 ID。
  3. swipeActionLeft - 可选 - 向左滑动动作 默认:'reveal'
  4. swipeActionRight - 可选 - 向右滑动动作 默认:'reveal'
  5. swipeMode - 启用手势或“无”。默认值:“两者”
  6. swipeCloseAllItemsWhenMoveList - 关闭列表运动中显示的项目。默认值:“真”
  7. swipeOpenOnLongPress - 长按显示默认值:'true'
  8. swipeAnimationTime - 物品掉落动画时间。默认:安卓配置
  9. swipeOffsetLeft - 左偏移
  10. swipeOffsetRight - 右偏移

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-24
    • 1970-01-01
    • 1970-01-01
    • 2019-10-17
    • 1970-01-01
    • 2020-12-05
    • 2010-10-22
    相关资源
    最近更新 更多