1

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.

Lucifer
  • 29,392
  • 25
  • 90
  • 143

1 Answers1

1

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.

Community
  • 1
  • 1
Bhavin
  • 6,020
  • 4
  • 24
  • 26
  • hee @Lucifer i have already accept this and implement this in my app –  May 14 '12 at 10:31