Reputation:
I want to insert screen coordinate into hashmap data structure means insert setX(x)and setY(y) value in hashmap. I make a android application in this application need to store screen coordinate.
Upvotes: 1
Views: 116
Reputation: 6010
Get size..
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
You can refer here
And for Hash map
HashMap<Integer> meMap=new HashMap<Integer>();
meMap.put(width);
meMap.put(height);
Given is just an example. you can Do accordingly. Other Reference.
Upvotes: 1