入门OBJECTID相关的列表项解析对象 [英] Getting objectid of a parse object related to the list item

查看:197
本文介绍了入门OBJECTID相关的列表项解析对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从parse.com检索数据的列表视图。我添加了一个onitemlongclicllstener清单中删除的项目,它是从列表,甚至从解析数据库pssed长$ P $。我知道如何从列表中移除,但不知道从解析数据库如何。
每个列表项都有与之相关的一个唯一的对象ID。
如果我们想从解析数据库中删除这是我们根据解析文档做到这一点。

I have a list view that retrieves data from parse.com. I have added a onitemlongclicllstener to delete the list item that is long pressed from the list and even from the parse database. I know how to remove from list but don't know how to from the parse database. Every listitem has a unique object id related to it. If we want to delete from parse database this is how we do it according to the parse documentation

ParseObject.createWithoutData("invFriend", "efgh").deleteEventually();

在哪里我的朋友是类名和EFGH是关系到列表项的对象ID将被删除

Where my friend is the class name and efgh is the object id related to the list item to be deleted

这工作,如果我们知道了对象ID

This works if we know the object id

但是,如果我们不知道用户早已pressed列表项的对象标识
如何对象ID参数传递

But what if we don't know the object id of the list item what the user has long pressed How to pass in the object id parameter

推荐答案

您可以找到对象ID为这样每个项目

You can find the object id for each list item like this

channelList.get(i).getObjectId()

在哪里channelList是解析对象列表。

Where channelList is the parse object list.

这篇关于入门OBJECTID相关的列表项解析对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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