需要帮助来实现47degree Android-SwipeListView
图书馆网址:
https://github.com/47deg/android-swipelistview
完整的承诺工作范例:
https://play.google.com/store/apps/details?id=com.fortysevendeg.android.swipelistview
问题:
每次我尝试在我的活动列表视图中实现swipelistview时,我都会遇到新问题.最后,我尝试将编译和分发的JAR(https://oss.sonatype.org/content/groups/public/com/fortysevendeg/android/swipelistview/1.0-SNAPSHOT/)包含到我的项目中并实施它; 它正在正确编译但是当我试图在设备上运行它或avd时,它崩溃了SwipeListViewTouchListener的异常ClassNotFoundException以及更多......
我正在使用的工具?
Android Studio
我需要的?
我会(以及更多开发人员寻找相同的解决方案)非常感谢,如果有人可以提供使用此库的非常基本的示例...
这个问题的动机是了解如何将47degree swipelistview库连接到您的应用程序并使其正常工作.正在使用它的程序员应该能够从API文档中找到它.
任何有关这方面的帮助都非常有用,因为我正在开发一个我希望实现此类功能的小型应用程序.
我是第一次编写 Python Flask WebApp。使用 Flask、SQLAlchemy、Marshmallow 作为我的主要软件包。我有一个嵌套模式,但在父页面中我没有显示子项,但我想将所有子项 ID 带入父项,以便在详细信息页面中我可以加载所有子项。我精简了孩子们只返回 id,但是我不希望它们作为一个属性对象,而是想要 ids 数组。
我如何像这样更改 JSON,
{
"description": "Report Name",
"id": 1,
"load_date_time": "2019-02-12T05:14:28+00:00",
"children": [
{
"id": 1
},
{
"id": 2
},
{
"id": 3
}
],
"publish_date_time": "2018-09-03T00:00:00+00:00",
"summary": "Summary will also be present. Usually two to three brief sentences about the content on the detail page."
}
Run Code Online (Sandbox Code Playgroud)
到,
{
"description": "Report Name",
"id": 1,
"load_date_time": "2019-02-12T05:14:28+00:00",
"children": [
1,
2,
3
],
"publish_date_time": "2018-09-03T00:00:00+00:00",
"summary": "Summary will also be …
Run Code Online (Sandbox Code Playgroud) 这是我的示例Bash 脚本 example.sh:
#!/bin/bash
# Reading arguments and mapping to respective variables
while [ $# -gt 0 ]; do
if [[ $1 == *"--"* ]]; then
v="${1/--/}"
declare $v
fi
shift
done
# Printing command line arguments through the mapped variables
echo ${arg1}
echo ${arg2}
Run Code Online (Sandbox Code Playgroud)
现在,如果在终端中运行 bash 脚本,如下所示:
$ bash ./example.sh "--arg1=value1" "--arg2=value2"
Run Code Online (Sandbox Code Playgroud)
我得到正确的输出,例如:
value1
value2
Run Code Online (Sandbox Code Playgroud)
完美的!这意味着我能够使用 bash 脚本中的变量 ${arg1} 和 ${arg2} 来使用传递给参数 --arg1 和 --arg2 的值。
我现在对这个解决方案很满意,因为它符合我的目的,但是,任何人都可以建议任何更好的解决方案来在 bash 脚本中使用命名命令行参数吗?