{"id":89,"date":"2013-02-18T15:34:27","date_gmt":"2013-02-18T15:34:27","guid":{"rendered":"http:\/\/www.einaweb.es\/dev\/?p=89"},"modified":"2013-03-06T09:39:07","modified_gmt":"2013-03-06T09:39:07","slug":"resoluciones-mobiles-y-tablets","status":"publish","type":"post","link":"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/","title":{"rendered":"Resoluciones Mobiles y Tablets"},"content":{"rendered":"<h2>Resoluciones t\u00edpicas<\/h2>\n<p dir=\"ltr\">Android define las siguientes resoluciones de pantalla t\u00edpicas:<\/p>\n<ul>\n<li>QVGA: 240 x 320 pixels<\/li>\n<li>HVGA: 320 x 480 pixels<\/li>\n<li>WQVGA: 240 x 432 pixels<\/li>\n<li>WVGA: 480 x 800 pixels<\/li>\n<li>WXGA: 1280 x 800 pixels<\/li>\n<\/ul>\n<p dir=\"ltr\">La densidad de pixels de un dispositivo es el n\u00famero de pixels por pulgada f\u00edsica de pantalla (dpi).<br \/>\n\u00bfC\u00f3mo calcular la densidad de pixels de un dispositivo? Normalmente conocemos la resoluci\u00f3n horizontal y vertical en pixels, adem\u00e1s del tama\u00f1o de la pantalla en pulgadas (diagonal).<br \/>\nSean:<br \/>\nh = resoluci\u00f3n horizontal en pixels<br \/>\nv = resoluci\u00f3n vertical en pixels<br \/>\ni = diagonal en pulgadas<br \/>\nA partir de estos datos podemos calcular la densidad de pixels por pulgada de la siguiente forma:<\/p>\n<p>dpi = sqrt( h * h + v * v) \/ i<\/p>\n<p>Por ejemplo, w=1280 pixels, h=800 pixels, i = 10.1 pulgadas.<br \/>\ndpi = sqrt( 1280 * 1280 + 800 * 800) \/ 10.1 = 149 dpi<\/p>\n<h2>Tama\u00f1os de pantalla<\/h2>\n<div>Android define los siguientes tama\u00f1os de pantalla (son valores aproximados):<\/div>\n<div>\n<ul>\n<li>small: desde 2 pulgadas a 3 pulgadas<\/li>\n<li>normal: desde 3 pulgadas a 4.5 pulgadas<\/li>\n<li>large: desde 4.5 pulgadas hasta 7 pulgadas<\/li>\n<li>xlarge: desde 7 pulgadas hasta 10 pulgadas<\/li>\n<\/ul>\n<\/div>\n<h2>Densidades de pantalla<\/h2>\n<div>Android define las siguientes densidades:<\/div>\n<div>\n<ul>\n<li>ldpi: desde 100 hasta 150<\/li>\n<li>mdpi: desde 150 hasta 200<\/li>\n<li>hdpi: desde 200 hasta 250<\/li>\n<li>xhdpi: desde 250 hasta 300<\/li>\n<\/ul>\n<\/div>\n<h2>Programaci\u00f3n para varias densidades de pantalla<\/h2>\n<div>Las distintas densidades siguen las siguientes proporciones aproximadamente: 3 : 4 : 6 : 8<\/div>\n<div>As\u00ed, si tenemos un bitmap de 100&#215;100 pixels para mdpi, deber\u00edamos tener las versiones del bitmap siguientes:<\/div>\n<div>\n<ul>\n<li>75&#215;75 para ldpi<\/li>\n<li>150&#215;150 para hdpi<\/li>\n<li>200&#215;200 para xhdpi<\/li>\n<\/ul>\n<p>Y de esta forma, el bitmap saldr\u00e1 con el mismo tama\u00f1o real en todas las densidades de pantalla.<\/p><\/div>\n<div>Cuando se programa para Android, siempre se deben especificar los tama\u00f1os en dp (density pixels). 1 dp es un pixel en una pantalla mdpi de 160 dpi.<\/div>\n<div>Si especificamos los tama\u00f1os en dp, entonces Android convierte los dp a pixels aplicando la siguiente f\u00f3rmula:<\/div>\n<div>pixels = dp * dpi \/ 160<\/div>\n<div>Si por ejemplo, un bot\u00f3n tiene un ancho de 100 dp, entonces en una pantalla de 200 dpi Android le dar\u00e1 un tama\u00f1o de 100 * 200 \/ 160 = 125 pixels. Sin embargo, en una pantalla de 100 dpi, Android le dar\u00e1 un tama\u00f1o de 100 * 100 \/ 160 = 62 pixels. El tama\u00f1o visual ser\u00e1 siempre el mismo.<\/div>\n<div>Se recomienda que los objetos que puede pulsar el usuario con el dedo tengan un tama\u00f1o de al menos 45&#215;45 dp.<\/div>\n<p dir=\"ltr\" id=\"internal-source-marker_0.057558322086871005\">Las resoluciones m\u00e1s comunes son:<\/p>\n<p dir=\"ltr\">telefono:<\/p>\n<p dir=\"ltr\">iPhone 3: 320 x 480<\/p>\n<p dir=\"ltr\">iPhone 4: 640 x 960<\/p>\n<p dir=\"ltr\">iPhone 5: 640 x 1136<\/p>\n<p dir=\"ltr\">SGS Mini: 240 x 320<\/p>\n<p dir=\"ltr\">SGS Ace: 320 x 480<\/p>\n<p dir=\"ltr\">SGS 2: 480 x 800<\/p>\n<p dir=\"ltr\">SGS 3: 720 \u00d71080<\/p>\n<p dir=\"ltr\">1080P:<\/p>\n<p>&nbsp;<\/p>\n<p dir=\"ltr\">Tablet:<\/p>\n<p dir=\"ltr\">IPAD: 1.024 x 768<\/p>\n<p dir=\"ltr\">iPad Retina:<\/p>\n<p dir=\"ltr\">SGS Tablet 2 7&#8243; : 1024 x 600<\/p>\n<p dir=\"ltr\">NEXUS 7: 1280 x 800<\/p>\n<p>NEXUS 10:<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Resoluciones t\u00edpicas Android define las siguientes resoluciones de pantalla t\u00edpicas: QVGA: 240 x 320 pixels HVGA: 320 x 480 pixels WQVGA: 240 x 432 pixels WVGA: 480 x 800 pixels WXGA: 1280 x 800 pixels La densidad de pixels de un dispositivo es el n\u00famero de pixels por pulgada f\u00edsica de pantalla (dpi). \u00bfC\u00f3mo calcular [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-mobiles-y-tablets"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Resoluciones Mobiles y Tablets - Blog Desarrollador<\/title>\n<meta name=\"description\" content=\"Resoluciones Mobiles y Tablets - Blog Desarrollador\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Resoluciones Mobiles y Tablets - Blog Desarrollador\" \/>\n<meta property=\"og:description\" content=\"Resoluciones Mobiles y Tablets - Blog Desarrollador\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Desarrollador\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-18T15:34:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-03-06T09:39:07+00:00\" \/>\n<meta name=\"author\" content=\"Angel Fernandez Gutierrez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@afernandezg76\" \/>\n<meta name=\"twitter:site\" content=\"@afernandezg76\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Angel Fernandez Gutierrez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/\",\"url\":\"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/\",\"name\":\"Resoluciones Mobiles y Tablets - Blog Desarrollador\",\"isPartOf\":{\"@id\":\"http:\/\/www.einaweb.es\/develop\/#website\"},\"datePublished\":\"2013-02-18T15:34:27+00:00\",\"dateModified\":\"2013-03-06T09:39:07+00:00\",\"author\":{\"@id\":\"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c\"},\"description\":\"Resoluciones Mobiles y Tablets - Blog Desarrollador\",\"breadcrumb\":{\"@id\":\"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"http:\/\/www.einaweb.es\/develop\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resoluciones Mobiles y Tablets\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/#website\",\"url\":\"http:\/\/www.einaweb.es\/develop\/\",\"name\":\"Blog Desarrollador\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.einaweb.es\/develop\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c\",\"name\":\"Angel Fernandez Gutierrez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g\",\"caption\":\"Angel Fernandez Gutierrez\"},\"url\":\"http:\/\/www.einaweb.es\/develop\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Resoluciones Mobiles y Tablets - Blog Desarrollador","description":"Resoluciones Mobiles y Tablets - Blog Desarrollador","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/","og_locale":"es_ES","og_type":"article","og_title":"Resoluciones Mobiles y Tablets - Blog Desarrollador","og_description":"Resoluciones Mobiles y Tablets - Blog Desarrollador","og_url":"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/","og_site_name":"Blog Desarrollador","article_published_time":"2013-02-18T15:34:27+00:00","article_modified_time":"2013-03-06T09:39:07+00:00","author":"Angel Fernandez Gutierrez","twitter_card":"summary_large_image","twitter_creator":"@afernandezg76","twitter_site":"@afernandezg76","twitter_misc":{"Escrito por":"Angel Fernandez Gutierrez","Tiempo de lectura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/","url":"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/","name":"Resoluciones Mobiles y Tablets - Blog Desarrollador","isPartOf":{"@id":"http:\/\/www.einaweb.es\/develop\/#website"},"datePublished":"2013-02-18T15:34:27+00:00","dateModified":"2013-03-06T09:39:07+00:00","author":{"@id":"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c"},"description":"Resoluciones Mobiles y Tablets - Blog Desarrollador","breadcrumb":{"@id":"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.einaweb.es\/develop\/resoluciones-mobiles-y-tablets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"http:\/\/www.einaweb.es\/develop\/"},{"@type":"ListItem","position":2,"name":"Resoluciones Mobiles y Tablets"}]},{"@type":"WebSite","@id":"http:\/\/www.einaweb.es\/develop\/#website","url":"http:\/\/www.einaweb.es\/develop\/","name":"Blog Desarrollador","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.einaweb.es\/develop\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"es"},{"@type":"Person","@id":"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/2d3361868423160a6db46ce6f9fc9a3c","name":"Angel Fernandez Gutierrez","image":{"@type":"ImageObject","inLanguage":"es","@id":"http:\/\/www.einaweb.es\/develop\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/366f7c75ad085d0dcc2c290559c1aa5947679d86e3a8c55db42ac1c26e16c816?s=96&d=mm&r=g","caption":"Angel Fernandez Gutierrez"},"url":"http:\/\/www.einaweb.es\/develop\/author\/admin\/"}]}},"_links":{"self":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":3,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":135,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/posts\/89\/revisions\/135"}],"wp:attachment":[{"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.einaweb.es\/develop\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}