{"id":1459,"date":"2012-07-10T19:01:56","date_gmt":"2012-07-10T11:01:56","guid":{"rendered":"http:\/\/leybreeze.com\/blog\/?p=1459"},"modified":"2012-07-10T19:01:56","modified_gmt":"2012-07-10T11:01:56","slug":"android-4-1%e4%b8%ad%e6%96%87%e7%ae%80%e4%bb%8b","status":"publish","type":"post","link":"http:\/\/leybreeze.com\/blog\/?p=1459","title":{"rendered":"Android 4.1\u4e2d\u6587\u7b80\u4ecb"},"content":{"rendered":"<p>\u672c\u6587\u4e3b\u8981\u8bd1\u81eaAndroid\u5f00\u53d1\u8005\u7f51\u7ad9\u7684<a title=\"Android 4.1 for Developers\" href=\"http:\/\/developer.android.com\/about\/versions\/jelly-bean.html\" target=\"_blank\">\u9762\u5411\u5f00\u53d1\u8005\u7684Android 4.1\u7b80\u4ecb<\/a>\u6587\u7ae0\uff0c\u76ee\u7684\u5728\u4e8e\u7b80\u8ff0Android 4.1\u7cfb\u7edf\u7684\u65b0\u7279\u6027\uff0c\u63d0\u4f9b\u4e00\u4e2a\u6982\u7565\u7ea7\u7684\u4e86\u89e3\u3002\u6ca1\u6709\u4f7f\u7528\u8be5\u6587\u7ae0\u4e2d\u7684\u56fe\u7247\u3002\u76f8\u5173\u56fe\u7247\u4ee5\u53ca\u8be6\u7ec6\u7684\u5185\u5bb9\u8bf7\u76f4\u63a5\u70b9\u51fb\u94fe\u63a5\u67e5\u770b\u3002<\/p>\n<p>Android 4.1 \u5c06\u662f\u8fc4\u4eca\u4e3a\u6b62\u6700\u4e3a\u5feb\u901f\u6d41\u7545\u7684 Android \u7248\u672c\uff0c\u540c\u65f6\u589e\u52a0\u4e86\u5927\u91cf\u5bf9\u5f00\u53d1\u8005\u548c\u7528\u6237\u6765\u8bf4\u5f88\u4fbf\u5229\u7684\u529f\u80fd\u3002\u8981\u4e86\u89e3\u6700\u65b0\u7684 API \u5177\u4f53\u7ec6\u8282\uff0c\u8bf7\u53c2\u89c1\u201c<a title=\"Android 4.1 APIs\" href=\"http:\/\/developer.android.com\/about\/versions\/android-4.1.html\" target=\"_blank\">Android 4.1 APIs<\/a>\u201d\u3002<\/p>\n<p><strong>\u66f4\u5feb\uff0c\u66f4\u6d41\u7545\uff0c\u66f4\u591a\u53cd\u9988<\/strong><\/p>\n<p>Android 4.1 \u8fdb\u884c\u4e86\u5927\u91cf\u4f18\u5316\u6765\u964d\u4f4e\u5ef6\u8fdf\uff0c\u63d0\u4f9b\u8f7b\u677e\u7684\u64cd\u4f5c\u4f53\u9a8c\u3002Android 4.1 \u91c7\u7528\u4e86<strong>\u5782\u76f4\u540c\u6b65\u8ba1\u65f6\uff08<strong>vsync timing<\/strong>\uff09\u00a0<\/strong>\u6765\u5b9e\u73b0\u7a33\u5b9a\u7684\u52a8\u753b\u5e27\u901f\u3002<span style=\"color: #000000;\">\u6e32\u67d3\u3001\u89e6\u6478\u4e8b\u4ef6\u3001\u5237\u65b0\u7b49\u90fd\u6309\u7167\u76f8\u540c\u7684\u9891\u7387\u8fdb\u884c\u800c\u4e0d\u4f1a\u5ffd\u5feb\u5ffd\u6162\u3002<\/span><\/p>\n<p>Android 4.1 \u8fd8\u5728\u56fe\u5f62\u6d41\u6c34\u7ebf\u4e2d\u589e\u52a0\u4e86<strong>\u4e09\u500d\u7f13\u51b2\uff08<strong>triple buffering<\/strong>\uff09<\/strong>\u6765\u8fdb\u4e00\u6b65\u63d0\u5347\u5404\u79cd\u64cd\u4f5c\u7684\u6d41\u7545\u6027\u3002<\/p>\n<p>\u9664\u4e86\u5c06\u89e6\u6478\u4e0e\u5782\u76f4\u540c\u6b65\u8ba1\u65f6\u76f8<strong>\u540c\u6b65\uff08<strong>synchronizing touch<\/strong>\uff09<\/strong>\u5916\uff0cAndroid 4.1 \u8fd8\u4f1a<strong>\u9884\u6d4b\uff08<strong>anticipating<\/strong>\uff09<\/strong>\u89e6\u6478\u4f4d\u7f6e\u6765\u8fdb\u884c\u63d0\u524d\u5237\u65b0\u4ee5\u63d0\u9ad8\u6d41\u7545\u5ea6\u3002\u5728\u5fc5\u8981\u65f6\u8fd8\u4f1a\u4f7f\u7528<strong>CPU\u8f93\u5165\u589e\u5f3a\uff08<strong>CPU input boost<\/strong>\uff09<\/strong>\u6765\u786e\u4fdd\u6ca1\u6709\u5ef6\u8fdf\u3002<\/p>\n<p>Android 4.1 \u4f7f\u7528\u4e86\u65b0\u7684\u00a0<strong>systrace<\/strong> \u6765\u76f4\u63a5\u4ece\u5185\u6838\u6536\u96c6\u6570\u636e\uff0c\u8fdb\u4e00\u6b65\u63d0\u5347\u6d41\u7545\u5ea6\u3002\u8fd9\u4e9b\u6570\u636e\u88ab\u8868\u793a\u4e3a\u4e00\u7ec4\u5782\u76f4\u5806\u53e0\u7684\u65f6\u5e8f\u56fe\uff0c\u7528\u6765\u5206\u79bb\u6e32\u67d3\u4e2d\u65ad\u548c\u5176\u4ed6\u4e8b\u4ef6\u3002\u8be5\u5de5\u5177\u5728\u6700\u65b0\u7684 SDK \u5df2\u7ecf\u53ef\u7528\u3002<\/p>\n<p><strong>\u589e\u5f3a\u7684\u4f7f\u7528\u6027<\/strong><\/p>\n<p>\u65b0\u589e\u4e86\u4e00\u4e9b\u5e2e\u52a9\u4f7f\u7528\u8bbe\u5907\u7684\u529f\u80fd\u3002<\/p>\n<p><strong>\u66f4\u597d\u7684\u56fd\u9645\u5316\u652f\u6301<\/strong><\/p>\n<p>\u5728 TextView \u548c EditText \u4e2d\u652f\u6301<strong>\u53cc\u5411\u6587\u5b57\u663e\u793a<\/strong>\uff08\u4ece\u5de6\u81f3\u53f3\u4e0e\u4ece\u53f3\u81f3\u5de6\uff09\u3002<\/p>\n<p>\u65b0\u589e\u4e00\u4e9b\u8bed\u8a00\u652f\u6301\u3002\u65b0\u7248\u7684\u8868\u60c5\u6587\u5b57\u652f\u6301\u3002\u66f4\u597d\u7684\u65e5\u8bed\u5b57\u5f62\u652f\u6301\u3002WebView \u4e2d\u7684\u5782\u76f4\u6587\u672c\u652f\u6301\u3002\u7b49\u3002<\/p>\n<p>\u652f\u6301\u81ea\u5b9a\u4e49\u952e\u76d8\u5e03\u5c40\u3002\u5e76\u53ef\u5f00\u53d1\u76f8\u5e94\u7684\u5e94\u7528\u4f9b\u7528\u6237\u4f7f\u7528\u3002<\/p>\n<p><strong>\u66f4\u6f02\u4eae\u7684UI<\/strong><\/p>\n<p><strong>\u53ef\u6269\u5c55\u901a\u77e5<\/strong>\u80fd\u591f\u63d0\u4f9b\u66f4\u591a\u7684\u4fe1\u606f\u4ee5\u53ca\u65b0\u7c7b\u578b\u7684\u6570\u636e\u3002\u652f\u6301\u66f4\u591a\u7684\u901a\u77e5\u98ce\u683c\u5e76\u80fd\u7ed9\u901a\u77e5\u589e\u52a0\u66f4\u591a\u7684\u53ef\u64cd\u4f5c\u529f\u80fd\u3002<\/p>\n<p><strong>\u53ef\u7f29\u653e\u684c\u9762\u63d2\u4ef6<\/strong>\u80fd\u81ea\u52a8\u53d8\u66f4\u4e3a\u9002\u5408\u7684\u5c3a\u5bf8\u4ee5\u663e\u793a\u5728\u684c\u9762\u4e0a\u3002<\/p>\n<p>\u5f97\u76ca\u4e8e<strong>\u7b80\u5316\u7684\u4efb\u52a1\u5bfc\u822a<\/strong>\uff0c\u8fd4\u56de\u4e0a\u4e00\u7ea7\u83dc\u5355\u53d8\u5f97\u66f4\u4e3a\u7b80\u5355\u800c\u6613\u4e8e\u7406\u89e3\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7 <strong>XML \u5c5e\u6027<\/strong>\u7684\u65b9\u5f0f\u5728 manifest \u6587\u4ef6\u4e2d\u5b9e\u73b0\u3002<\/p>\n<p>\u800c\u65b0\u7684 <strong>TaskStackBuilder<\/strong>\u00a0\u7c7b\u5219\u63d0\u4f9b\u4e86\u5feb\u901f\u542f\u52a8\u4efb\u52a1\u6808\u4e2d\u7684\u4efb\u52a1\u7684\u53ef\u80fd\u3002<\/p>\n<p>\u65b0\u7684\u00a0<strong>ActivityOptions <\/strong>\u8f85\u52a9\u7c7b\u4f7f\u5f97 Activity \u7684\u52a8\u753b\u6548\u679c\u66f4\u6613\u4e8e\u63a7\u5236\u3002\u6b64\u5916\u8fd8\u6709\u65b0\u7684<strong>\u6de1\u5165\u6de1\u51fa<\/strong>\u7b49\u8fc7\u6e21\u52a8\u753b\u6548\u679c\u3002<\/p>\n<p><strong>GridLayout<\/strong>\u00a0\u548c\u00a0<strong>ViewStub <\/strong>\u4e5f\u53ef\u4f5c\u4e3a\u53ef\u9065\u63a7\u89c6\u56fe\u7528\u4e8e\u684c\u9762\u63d2\u4ef6\u7b49\u573a\u5408\u3002<\/p>\n<p>\u52a8\u6001\u684c\u9762\u80cc\u666f<strong>\u652f\u6301\u9884\u89c8\u529f\u80fd<\/strong>\u4f7f\u5f97\u7528\u6237\u80fd\u66f4\u5bb9\u6613\u5730\u8bc6\u522b\u5b83\u4eec\u3002<\/p>\n<p><strong>\u8054\u7cfb\u4eba\u7167\u7247<\/strong>\u5219\u652f\u6301\u9ad8\u8fbe720\u00d7720\u7684\u5206\u8fa8\u7387\u3002<\/p>\n<p><strong>\u65b0\u7684\u8f93\u5165\u7c7b\u578b<\/strong><\/p>\n<p>\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5<strong>\u5f97\u77e5\u8bbe\u5907\u7684\u8fde\u63a5\u60c5\u51b5<\/strong>\uff0c\u5728\u6bd4\u5982\u8fde\u63a5 USB \u6216\u84dd\u7259\u65f6\u5f97\u5230\u901a\u77e5\u3002<\/p>\n<p>\u5e94\u7528\u7a0b\u5e8f\u8fd8\u80fd<strong>\u83b7\u53d6\u5f53\u524d\u8fde\u63a5\u7684\u5916\u90e8\u8f93\u5165\u8bbe\u5907\u7684\u60c5\u51b5<\/strong>\u751a\u81f3<strong>\u63a7\u5236\u8bbe\u5907\u7684\u9707\u52a8<\/strong>\u3002<\/p>\n<p><strong>\u52a8\u753b\u548c\u56fe\u5f62<\/strong><\/p>\n<p>\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u901a\u8fc7\u7cfb\u7edf\u7ea7\u7684<strong>\u5782\u76f4\u540c\u6b65\u8ba1\u65f6<\/strong>\u6765\u83b7\u5f97\u66f4\u597d\u7684\u56fe\u5f62\u52a8\u753b\u6027\u80fd\u3002\u540c\u65f6\u8fd8\u80fd\u4f7f\u7528\u79cd\u7c7b\u66f4\u4e3a\u4e30\u5bcc\u7684\u52a8\u753b\u6548\u679c\u3002<\/p>\n<p><strong>\u65b0\u7684\u8fde\u63a5\u529f\u80fd<\/strong><\/p>\n<p>\u901a\u8fc7\u57fa\u4e8e NFC \u7684 <strong>Android Beam<\/strong> \u5b9e\u73b0\u66f4\u8f7b\u677e\u7684\u5206\u4eab\u529f\u80fd\u3002<\/p>\n<p>\u66f4\u5f3a\u7684 WiFi \u7f51\u7edc\u652f\u6301\u4f7f\u5f97\u8bbe\u5907\u53ef\u4ee5\u548c\u5176\u4ed6 WiFi \u8bbe\u5907\u8fde\u63a5\u5e76\u4e92\u6362\u6570\u636e\u3002<\/p>\n<p>\u652f\u6301<strong>\u7f51\u7edc\u5e26\u5bbd\u7ba1\u7406<\/strong>\u4ee5\u66f4\u597d\u5730<strong>\u7ba1\u7406\u6570\u636e\u6d41\u91cf<\/strong>\u3002<\/p>\n<p><strong>\u65b0\u7684\u591a\u5a92\u4f53\u529f\u80fd<\/strong><\/p>\n<p>\u65b0\u589e\u5305\u62ec\u4f4e\u7ea7\u89e3\u7801\u652f\u6301\u3001USB \u97f3\u9891\u3001\u97f3\u9891\u5f55\u5236\u89e6\u53d1\u529f\u80fd\u3001\u652f\u6301 5.1 \u58f0\u9053 ACC \u89e3\u7801\u7684\u591a\u58f0\u9053\u97f3\u9891\u3001\u97f3\u9891\u9884\u5904\u7406\u548c\u94fe\u5316\u7b49\u5728\u5185\u7684\u97f3\u9891\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n<p>\u652f\u6301\u5a92\u4f53\u8def\u7531\u5668\u4ee5\u9009\u62e9\u5a92\u4f53\u64ad\u653e\u65b9\u5f0f\u3002<\/p>\n<p><strong>Renderscript\u8fd0\u7b97<\/strong><\/p>\n<p>Android 4.1 \u6269\u5c55\u4e86\u00a0Renderscript \u8fd0\u7b97\u4f7f\u5f97\u652f\u6301\u66f4\u5f3a\u7684\u7075\u6d3b\u6027\uff0c\u80fd\u5728\u66f4\u591a\u7684\u786c\u4ef6\u4e0a\u66f4\u597d\u5730\u8fd0\u884c\u3002<\/p>\n<p><strong>\u6d4f\u89c8\u5668\u548c WebView<\/strong><\/p>\n<p>Android 4.1 \u4e2d\u6709\u66f4\u597d\u7684 HTML5\/CSS\u52a8\u753b\/Javascript \u7b49\u6027\u80fd\u3002<\/p>\n<p><strong>Google API \u548c\u670d\u52a1<\/strong><\/p>\n<h3 id=\"gcm\">\u652f\u6301 Google Cloud Messaging for Android\uff0c\u7528\u4e8e\u53d1\u9001\u7b80\u77ed\u6d88\u606f\u3002<\/h3>\n<p>\u652f\u6301\u5e94\u7528\u52a0\u5bc6\u4ee5\u66f4\u597d\u5730\u9632\u6b62\u76d7\u7248\u3002<\/p>\n<p>\u652f\u6301\u5e94\u7528\u7a0b\u5e8f\u7684\u667a\u80fd\u5347\u7ea7\uff0c\u53ea\u9700\u4e0b\u8f7d\u6240\u9700\u5347\u7ea7\u90e8\u5206\u7684 apk \u6587\u4ef6\u5373\u53ef\uff0c\u51cf\u5c11\u4e86\u6570\u636e\u6d41\u91cf\u7684\u4f7f\u7528\u3002<\/p>\n<p>\u4ee5\u53ca\u5c06\u6765\u66f4\u591a\u7684 Google Play \u670d\u52a1\u3002<\/p>\n<p>\u8fd9\u6b21\u7684 Android 4.1 \u867d\u7136\u548c 4.0 \u76f8\u6bd4\u6ca1\u6709\u63d0\u5347\u5927\u7248\u672c\u53f7\uff0c\u4f46\u662f\u6539\u8fdb\u4e4b\u5904\u4e5f\u76f8\u5f53\u591a\u3002\u80fd\u5f88\u660e\u663e\u7684\u611f\u53d7\u5230 Android \u7cfb\u7edf\u6b63\u5728\u4e00\u6b65\u6b65\u8d70\u5411\u6210\u719f\u4e0e\u5b8c\u5584\u3002\u867d\u7136\u8fc7\u5f80\u673a\u578b\u4e0d\u4e00\u5b9a\u90fd\u80fd\u5f97\u5230\u6700\u65b0\u7cfb\u7edf\u7684\u5347\u7ea7\uff0c\u4e0d\u8fc7\u968f\u7740\u65f6\u95f4\u7684\u63a8\u79fb\uff0cAndroid \u7cfb\u7edf\u8bbe\u5907\u7684\u4f53\u9a8c\u5fc5\u7136\u4f1a\u8d8a\u6765\u8d8a\u597d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4e3b\u8981\u8bd1\u81eaAndroid\u5f00\u53d1\u8005\u7f51\u7ad9\u7684\u9762\u5411\u5f00\u53d1\u8005\u7684Android 4.1\u7b80\u4ecb\u6587\u7ae0\uff0c\u76ee\u7684\u5728\u4e8e\u7b80\u8ff0Android  &hellip; <a href=\"http:\/\/leybreeze.com\/blog\/?p=1459\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cAndroid 4.1\u4e2d\u6587\u7b80\u4ecb\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[5],"_links":{"self":[{"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1459"}],"collection":[{"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1459"}],"version-history":[{"count":1,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1459\/revisions"}],"predecessor-version":[{"id":1460,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1459\/revisions\/1460"}],"wp:attachment":[{"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1459"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}