java - how to find the ppi of an android screen -
i have simple question? i'm looking code find ppi of android screen know how find height , width in pixles not amount of pixels per inch. need me find diagonal of screen. tried doesnt seem work
displaymetrics displaymetrics = new displaymetrics(); windowmanager wm = (windowmanager) getapplicationcontext().getsystemservice(context.window_service); int ppi = (int) displaymetrics.density;
Comments
Post a Comment