{"id":38,"date":"2010-04-30T15:25:24","date_gmt":"2010-04-30T07:25:24","guid":{"rendered":"http:\/\/www.myvoipapp.com\/blogs\/yxh\/?p=38"},"modified":"2019-02-12T20:11:58","modified_gmt":"2019-02-12T12:11:58","slug":"android%e5%bc%80%e5%8f%91%e6%8c%87%e5%af%bc%e9%9a%8f%e8%af%912-%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e5%9f%ba%e6%9c%ac%e5%8e%9f%e7%90%862-activity%e8%a1%8c%e4%b8%ba","status":"publish","type":"post","link":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/2010\/04\/30\/android%e5%bc%80%e5%8f%91%e6%8c%87%e5%af%bc%e9%9a%8f%e8%af%912-%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e5%9f%ba%e6%9c%ac%e5%8e%9f%e7%90%862-activity%e8%a1%8c%e4%b8%ba\/","title":{"rendered":"Android\u5f00\u53d1\u6307\u5bfc\u968f\u8bd1(2) \u2014 \u5e94\u7528\u7a0b\u5e8f\u57fa\u672c\u539f\u7406(2) Activity(\u884c\u4e3a)"},"content":{"rendered":"<p>\u4e00\u4e2aActivity(\u884c\u4e3a)\u4ee3\u8868\u4e86\u4e00\u4e2a\u53ef\u89c6\u7684\u7528\u6237\u4ea4\u4e92\u63a5\u53e3. \u4f8b\u5982, \u4e00\u4e2a\u6587\u672c\u6d88\u606f\u7a0b\u5e8f\u53ef\u80fd\u4f1a\u6709\u4e00\u4e2aActivity(\u884c\u4e3a)\u7528\u4e8e\u663e\u793a\u8054\u7cfb\u4eba\u5217\u8868, \u7b2c\u4e8c\u4e2a\u884c\u4e3a\u7528\u4e8e\u7ed9\u9009\u5b9a\u7684\u8054\u7cfb\u4eba\u5199\u6587\u672c\u4fe1\u606f, \u53e6\u5916\u4e00\u4e2a\u884c\u4e3a\u7528\u4e8e\u663e\u793a\u4ee5\u524d\u7684\u4fe1\u606f\u6216\u8005\u6539\u53d8\u8bbe\u7f6e. \u5b83\u4eec\u5171\u540c\u5de5\u4f5c\u63d0\u4f9b\u4e86\u4e00\u4e2a\u805a\u5408\u7684\u7528\u6237\u754c\u9762.<\/p>\n<p>\u6bcf\u4e2a\u884c\u4e3a\u4e0e\u5176\u4ed6\u884c\u4e3a\u90fd\u662f\u72ec\u7acb\u7684, \u5b83\u4eec\u90fd\u662f\u4eceActivity\u57fa\u7c7b\u6d3e\u751f\u800c\u6765.<\/p>\n<p>\u6bcf\u4e2a\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u7531\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u884c\u4e3a\u6784\u6210. \u901a\u5e38\u5728\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u65f6, \u4f1a\u5c06\u5176\u4e2d\u4e00\u4e2a\u884c\u4e3a\u8bbe\u7f6e\u4e3a\u9996\u5148\u5448\u73b0\u7ed9\u7528\u6237\u7684\u884c\u4e3a. \u5f53\u524d\u884c\u4e3a\u53ef\u4ee5\u542f\u52a8\u4e0b\u4e00\u4e2a\u884c\u4e3a\u6765\u5b9e\u73b0\u884c\u4e3a\u7684\u8df3\u8f6c.<\/p>\n<p>\u6bcf\u4e2a\u884c\u4e3a\u90fd\u6709\u4e00\u4e2a\u7f3a\u7701\u7684\u7a97\u4f53. \u4e00\u822c\u800c\u8a00, \u7a97\u4f53\u603b\u662f\u586b\u6ee1\u6574\u4e2a\u5c4f\u5e55\u7684, \u4f46\u662f\u4e5f\u53ef\u4ee5\u6bd4\u5f53\u524d\u5c4f\u5e55\u5c0f\u4e9b\u5e76\u4e14\u6d6e\u5728\u5176\u4ed6\u7a97\u4f53\u4e4b\u4e0a. \u884c\u4e3a\u4e5f\u53ef\u4ee5\u4f7f\u7528\u9644\u52a0\u7684\u7a97\u4f53,\u4f8b\u5982\u5bf9\u8bdd\u6846\u7b49.<\/p>\n<p>\u7a97\u4f53\u7684\u53ef\u89c6\u5185\u5bb9\u7531View(\u89c6\u56fe)\u6765\u63d0\u4f9b, \u6240\u6709\u7684view\u90fd\u662f\u4eceview\u57fa\u7c7b\u6d3e\u751f. \u6bcf\u4e2aview\u63a7\u5236\u7a97\u4f53\u7684\u4e00\u90e8\u5206\u533a\u57df. \u7236View\u5305\u542b\u548c\u7ec4\u7ec7\u5b50view\u7684\u5e03\u5c40. \u53f6\u5b50view(\u5904\u5728\u6d3e\u751f\u5173\u7cfb\u7684\u5e95\u90e8)\u7ed8\u5236\u5b83\u4eec\u63a7\u5236\u7684\u533a\u57df, \u5e76\u54cd\u5e94\u7528\u6237\u5728\u8fd9\u90e8\u5206\u533a\u57df\u7684\u52a8\u4f5c.<\/p>\n<p>Android\u9884\u7f6e\u4e86\u4e00\u4e9bview, \u4f8b\u5982\u6309\u94ae, \u6587\u672c\u6846, \u6eda\u52a8\u6761\u7b49. (<span style=\"color: #0000ff;\">\u7b14\u6ce8: \u5728windows\u7f16\u7a0b\u4e2d, \u8fd9\u4e9b\u53cd\u800c\u662f\u7a97\u4f53\u5427<\/span>)<\/p>\n<p>\u884c\u4e3a\u7684\u7a97\u4f53\u53ef\u4ee5\u901a\u8fc7Activity.setContentView()\u65b9\u6cd5\u8bbe\u7f6eview\u7684\u5c42\u7ea7\u5173\u7cfb, Content View(\u5185\u5bb9View)\u662f\u8fd9\u79cd\u5c42\u7ea7\u5173\u7cfb\u4e2d\u7684\u6839\u8282\u70b9. (?)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e2aActivity(\u884c\u4e3a)\u4ee3\u8868\u4e86\u4e00\u4e2a\u53ef\u89c6\u7684\u7528\u6237\u4ea4\u4e92\u63a5\u53e3. \u4f8b\u5982, \u4e00\u4e2a\u6587\u672c\u6d88\u606f\u7a0b\u5e8f\u53ef\u80fd\u4f1a\u6709\u4e00\u4e2aActivity(\u884c\u4e3a)\u7528\u4e8e\u663e\u793a\u8054\u7cfb\u4eba\u5217\u8868, \u7b2c\u4e8c\u4e2a\u884c\u4e3a\u7528\u4e8e\u7ed9\u9009&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.myvoipapp.com\/blogs\/yxh\/2010\/04\/30\/android%e5%bc%80%e5%8f%91%e6%8c%87%e5%af%bc%e9%9a%8f%e8%af%912-%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e5%9f%ba%e6%9c%ac%e5%8e%9f%e7%90%862-activity%e8%a1%8c%e4%b8%ba\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[18,19],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category-6","tag-activity","tag-windows"],"_links":{"self":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":3,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"predecessor-version":[{"id":1976,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/38\/revisions\/1976"}],"wp:attachment":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}