I have three listviews, each of which is an activity with three different cursors, but all the same ContextMenu Show / Resolution code And when the selection event fire, I want to refresh this listView. I can not use In this method How is it possible? menuInfo.targetView
as the ListView linear linearLayout holds, and not ListView.
public boolean onContextItemSelected (MenuItem item)
you see the line
S are appending tag
s / holders adapter
, right?
adapter is a tag class per
Now,
@Override Public Boolean onContextItemSelected (MenuItem Item) {AdapterContextMenuInfo Info = (AdaptContactManuInfo) Item .getMenuInfo (); Class & lt ;? & Gt; Tag class = info.targetView.getTag (). GetClass (); If (tagClass == FirstTag.class) {// first list} else if (tagClass == SecondTag.class) {// second one} else {new throwing IllegalArgumentException ('I've screwed this hack.'); } // ...}
Comments
Post a Comment