I'm as Google glass development program,now i have two cards in an activity, And i want to tap the two cards respond to different events . I tried to use cardID==card1 or cardID==card2 in keyDown method but failed, because not have the variable cardID ,who can tell me how to represent the variable "cardID".
Asked
Active
Viewed 30 times
0
-
Shouldn't you be testing the value of the CardID, not whether is is the same as a different object? That is: if ( CardID.equalsIgnoreCase("string") – ErstwhileIII Mar 03 '14 at 14:05
1 Answers
0
I think my own question here would help you. In the code i posted just call the getSelectedItemPosition() inside the long press gesture detector.
-
thanks ! i used the method mScrollView.getItemAtPosition(position).equals(). And the problem has been solved! – user3345068 Mar 05 '14 at 03:54