How to get maximum x and y values of screen in android 2.3? -
i'm using andengine build first game. can receive x,y values of touch position following code. want compare x value(from touchevent) maximum x value of screen. possible andengine?
@override public boolean onscenetouchevent(final scene pscene, final touchevent pscenetouchevent) { if(this.mphysicsworld != null) { if(pscenetouchevent.isactiondown()) { this.addface(pscenetouchevent.getx(), pscenetouchevent.getpointerid()); return true; } } return false; }
there 2 concern maximum x , y of device 1 need don't know here post both.
- you can use camera_width , camera_height maximum x , y of game play.
you can use following code maximum height , width of device
display display = getwindowmanager().getdefaultdisplay();int width = display.getwidth();int height = display.getheight();
Comments
Post a Comment