{"id":1424,"date":"2013-02-01T08:34:52","date_gmt":"2013-02-01T15:34:52","guid":{"rendered":"http:\/\/wiebe-elsinga.com\/blog\/?p=1424"},"modified":"2013-02-01T10:24:41","modified_gmt":"2013-02-01T17:24:41","slug":"androiddev-pro-tip-dont-reload-when-orientation-changes","status":"publish","type":"post","link":"http:\/\/wiebe-elsinga.com\/blog\/androiddev-pro-tip-dont-reload-when-orientation-changes\/","title":{"rendered":"AndroidDev (Pro) tip: Do not forget screenSize"},"content":{"rendered":"<div class=\"wpsso-pinterest-pin-it-image\" style=\"display:none !important;\">\n<\/div><!-- .wpsso-pinterest-pin-it-image -->\n\n<p>So you are stuck using screenOrientation in your <em>android:configChanges<\/em> list within your <em>AndroidManifest<\/em>. Your activity will not be recreated, but will receive a callback instead.<br \/>\nYou may not know that this is insufficient on API level of 13 or above.<\/p>\n<p>In API level 13 or above, the screen size changes when the orientation changes, so this cause the activity to be destroyed. If you still want to keep the state and use <em>onConfigurationChanged()<\/em> you will also need to use <em>screenSize<\/em>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you are stuck using screenOrientation in your android:configChanges list within your AndroidManifest. Your activity will not be recreated, but will receive a callback instead. You may not know that this is insufficient on API level of 13 or above. In API level 13 or above, the screen size changes when the orientation changes, so this cause the activity to be destroyed. If you still want to keep the state and use onConfigurationChanged() you will also need to use screenSize.<\/p>\n","protected":false},"author":1,"featured_media":1247,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[133],"tags":[125],"_links":{"self":[{"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/posts\/1424"}],"collection":[{"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/comments?post=1424"}],"version-history":[{"count":0,"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/posts\/1424\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/media\/1247"}],"wp:attachment":[{"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/media?parent=1424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/categories?post=1424"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wiebe-elsinga.com\/blog\/wp-json\/wp\/v2\/tags?post=1424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}