private static HashMap<Integer, Bitmap> mBitmapCache; mBitmapCache.put(R.drawable.bg1,object);
R.drawable.bg1 is an int ... but i want to convert into Integer because Hashmap takes an Integer... and when draw the multiple objects in seconds , it creates a Integer Object runtime which affects the performence of the code...
R.drawable.bg1
int
Integer
Hashmap
int iInt = 10; Integer iInteger = Integer.valueOf(iInt);
P.S. Answer edited due to comments pointing out an issue with initial suggested solution.
2.1m questions
2.1m answers
60 comments
57.0k users