Tag Archives: display

1,966 views

Screen size density independent pixel resolution

Terms Screen size, density, density independent pixel, resolution as a picture – pictogram. Test your knowledge Q: How to find out the phone screen size? A: (By length of display diagonale in inch –  Not to measure a diagonal of device!!!) Q: … Continue reading

Posted in Android Examples Code | Tagged , | Comments Off on Screen size density independent pixel resolution
2,273 views

JavaScript how detect mobile device and get screen width

How detect mobile users on web page by javascript and get width users display. if (navigator.userAgent.match(/Mobi/)) { alert("Mobi"); var w = screen.width; // idTableMain replace with id of main table on your webpage document.getElementById(’idTableMain’).width = w; }

Posted in Android Examples Code, Smartphone | Tagged , | Comments Off on JavaScript how detect mobile device and get screen width
7,626 views

Display screen size resolution density dimension Android

Get display, screen resolution – dimension Android phone development example source code. Display display = getWindowManager().getDefaultDisplay(); int nWidth = display.getWidth(); int nHeight = display.getHeight();   DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); //get density per inch for example: 120 , 160 … Continue reading

Posted in Android Examples Code | Tagged , , , , | Comments Off on Display screen size resolution density dimension Android