A Map of View instances?
Posted
by
user291701
on Stack Overflow
See other posts from Stack Overflow
or by user291701
Published on 2011-03-10T23:28:38Z
Indexed on
2011/03/11
0:10 UTC
Read the original article
Hit count: 116
android
Is it possible to keep references to views keyed off of their hashCode
? Something like:
Map<Integer, View> views;
views.put(view1.hashCode(), view1);
views.put(view2.hashCode(), view2);
views.put(viewN.hashCode(), viewN);
I have a few in my view hierarchy and am downloading images for each. I want to be able to iterate over them quickly, or see if I've already previously added one (hence the map).
© Stack Overflow or respective owner