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

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -