android - Display.getSize vs Dispaly.getWidth -
i have little issue here... want size of display, can either calling deprecated display.getwidth / .getheight or can use display.getsize...
but heres problem... don't want use deprecated code, leaves me display.getsize... requires api 13 , min-api 8....
what should do? there option?
point size = new point(); display.getsize(size); width = size.x; height = size.y; vs
width = display.getwidth(); height = display.getheight();
use display metrics
displaymetrics display = this.getresources().getdisplaymetrics(); int width = display.widthpixels; int height = display.heightpixels;
Comments
Post a Comment