0
Ich bin auf Itemlongclicklistener t manipulieren Elemente in meinem Gridview. Ich möchte den Longclick mit Touch-Listener ändern. dies ist mein Codeandroid, wie Element touchlistener in gridView
//drag artifact on long clic
OnItemLongClickListener myOnItemLongClickListener = new OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view,
int position, long id) {
Artifact selectedItem = (Artifact) (parent.getItemAtPosition(position));
ArtifactAdapter associatedAdapter = (ArtifactAdapter) (parent.getAdapter());
List<Artifact> associatedList = associatedAdapter.getList();
PassObject passObj = new PassObject(view, selectedItem, associatedList, position);
ClipData data = ClipData.newPlainText("", "");
View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
view.startDrag(data, shadowBuilder, passObj, 0);
view.setVisibility(View.INVISIBLE);
zPLayout.setVisibility(View.VISIBLE);
if (associatedList == listArtifact) {
trashEditLayout.setVisibility(View.VISIBLE);
optionsArtifactLayout.setVisibility(View.GONE);
}
return true;
}
};
, wie kann ich das tun?
Sie ItemLongClick auf Touch-Ereignis implementieren möchten? – Nisarg