{"id":203694,"date":"2023-08-13T11:24:53","date_gmt":"2023-08-13T03:24:53","guid":{"rendered":"https:\/\/www.idc.net\/help\/203694\/"},"modified":"2023-08-13T11:24:53","modified_gmt":"2023-08-13T03:24:53","slug":"%e5%a4%9a%e5%9b%be%e8%af%a6%e8%a7%a3-android-ui%e8%ae%be%e8%ae%a1%e5%ae%98%e6%96%b9%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/203694\/","title":{"rendered":"\u591a\u56fe\u8be6\u89e3 \u201cAndroid UI\u201d\u8bbe\u8ba1\u5b98\u65b9\u6559\u7a0b"},"content":{"rendered":"<p>\u6211\u4eec\u66fe\u7ecf\u7ed9\u5927\u5bb6\u4e00\u4e2a\u300aMeeGo\u79fb\u52a8\u7ec8\u7aef\u8bbe\u5907\u5f00\u53d1UI\u8bbe\u8ba1\u57fa\u7840\u6559\u7a0b\u300b\uff0c\u540c\u65f6\u5f88\u591a\u670b\u53cb\u90fd\u5728\u5bfb\u627eAndroid UI\u5f00\u53d1\u7684\u6559\u7a0b\uff0c\u6211\u4eec\u4eceAndroid\u7684\u5b98\u65b9\u5f00\u53d1\u8005\u535a\u5ba2\u627e\u4e86\u4e00\u4efd\u5e7b\u706f\u7247\uff0c\u4ecb\u7ecd\u4e86\u4e00\u4e9bAndroid UI\u8bbe\u8ba1\uff0c\u6211\u4eec\u628a\u8fd9\u4e2a\u6559\u7a0b\u6574\u7406\u51fa\u6765\uff0c\u5e0c\u671b\u5927\u5bb6\u559c\u6b22\u3002<\/p>\n<p>\u60f3\u4e86\u89e3\u5168\u90e8Android UI\u6559\u7a0b\u5185\u5bb9\u8bf7\u70b9\u51fb\u72ec\u5bb6\u4e13\u9898\uff1a\u8c37\u6b4c\u5b98\u65b9\u6559\u7a0b:Android UI\u8bbe\u8ba1\u6280\u5de7<\/p>\n<p style=\"text-align: center\">\n<p style=\"text-align: center;padding-bottom: 0px;margin: 0px 0px 15px;padding-left: 0px;padding-right: 0px;padding-top: 0px\">\n<p>\u4f5c\u4e3a\u5f00\u53d1\u8005\uff0c\u4e3a\u5565\u6211\u4eec\u8981\u5173\u5fc3UI\uff0c\u524d\u9762\u7684\u4e00\u5806\u901a\u901a\u53ef\u4ee5\u5ffd\u7565\u6389\uff0c\u76f4\u63a5\u8df3\u5230***\u4e00\u6761\u3002\u56e0\u4e3a\u597d\u7684UI\u8bbe\u8ba1\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5356\u51fa\u66f4\u591a\u62f7\u8d1d\uff0c\u8d5a\u5230\u66f4\u591a\u94b1\u3002<\/p>\n<p>#p#<\/p>\n<p><strong>\u7b80\u4ecb<\/strong><\/p>\n<p style=\"text-align: center;padding-bottom: 0px;margin: 0px 0px 15px;padding-left: 0px;padding-right: 0px;padding-top: 0px\">\n<p><strong>\u8fd9\u4e2a\u6559\u7a0b\u5305\u542b5\u4e2a\u90e8\u5206\uff1a<\/strong><\/p>\n<p>\u25c6\u8be5\u505a\u4ec0\u4e48\uff0c\u4e0d\u8be5\u505a\u4ec0\u4e48<\/p>\n<p>\u25c6\u8bbe\u8ba1\u54f2\u5b66\u548c\u8003\u91cf<\/p>\n<p>\u25c6\u4f60\u5fc5\u987b\u4e86\u89e3\u7684 UI \u6846\u67b6\u7279\u6027<\/p>\n<p>\u25c6\u65b0\u7684 UI \u8bbe\u8ba1\u6a21\u5f0f<\/p>\n<p>\u25c6\u56fe\u6807\u548c\u51c6\u5219<\/p>\n<p>#p#<\/p>\n<p style=\"text-align: center\">\n<p style=\"text-align: center\">\n<p><strong>UI\u8bbe\u8ba15\u4e0d\u8981<\/strong><\/p>\n<p>Don\u2019t:<\/p>\n<p>\u25c6\u4e0d\u8981\u7167\u642c\u4f60\u5728\u5176\u5b83\u5e73\u53f0\u7684UI\u8bbe\u8ba1\uff0c\u5e94\u8be5\u8ba9\u7528\u6237\u611f\u89c9\u662f\u5728\u771f\u6b63\u4f7f\u7528\u4e00\u4e2a Android \u8f6f\u4ef6\uff0c\u5728\u4f60\u7684\u5546\u6807\u663e\u793a\u548c\u5e73\u53f0\u6574\u4f53\u89c2\u611f\u4e4b\u95f4\u505a\u597d\u5e73\u8861<\/p>\n<p>\u25c6\u4e0d\u8981\u8fc7\u5ea6\u4f7f\u7528\u6a21\u6001\u5bf9\u8bdd\u6846<\/p>\n<p>\u25c6\u4e0d\u8981\u4f7f\u7528\u56fa\u5b9a\u7684\u7edd\u5bf9\u5b9a\u4f4d\u7684\u5e03\u5c40<\/p>\n<p>\u25c6\u4e0d\u8981\u4f7f\u7528px\u5355\u4f4d\uff0c\u4f7f\u7528dp\u6216\u8005\u4e3a\u6587\u672c\u4f7f\u7528sp<\/p>\n<p>\u25c6 \u4e0d\u8981\u4f7f\u7528\u592a\u5c0f\u7684\u5b57\u4f53<\/p>\n<p>#p#<\/p>\n<p style=\"text-align: center\">\n<p style=\"text-align: center\">\n<p>&nbsp;<\/p>\n<p><strong>UI\u8bbe\u8ba19\u8981\u7d20\uff1a<\/strong><\/p>\n<p>Do\uff1a<\/p>\n<p>\u25c6\u4e3a\u9ad8\u5206\u8fa8\u7387\u7684\u5c4f\u5e55\u521b\u5efa\u8d44\u6e90\uff08\u7f29\u5c0f\u603b\u6bd4\u653e\u5927\u597d\uff09<\/p>\n<p>\u25c6 \u9700\u8981\u70b9\u51fb\u7684\u5143\u7d20\u8981\u591f\u5927<\/p>\n<p>\u25c6\u56fe\u6807\u8bbe\u8ba1\u9075\u5faa Android \u7684\u51c6\u5219<\/p>\n<p>\u25c6 \u4f7f\u7528\u9002\u5f53\u7684\u95f4\u8ddd\uff08margins, padding\uff09<\/p>\n<p>\u25c6 \u652f\u6301D-pad\u548ctrackball\u5bfc\u822a<\/p>\n<p>\u25c6\u6b63\u786e\u7ba1\u7406\u6d3b\u52a8\uff08activity\uff09\u5806\u6808<\/p>\n<p>\u25c6 \u6b63\u786e\u5904\u7406\u5c4f\u5e55\u65b9\u5411\u53d8\u5316<\/p>\n<p>\u25c6\u4f7f\u7528\u4e3b\u9898\/\u6837\u5f0f\uff0c\u5c3a\u5bf8\u548c\u989c\u8272\u8d44\u6e90\u6765\u51cf\u5c11\u591a\u4f59\u7684\u503c<\/p>\n<p>\u25c6\u548c\u89c6\u89c9\u4ea4\u4e92\u8bbe\u8ba1\u5e08\u5408\u4f5c!<\/p>\n<p style=\"text-align: left\">#p#<\/p>\n<p style=\"text-align: center\">\n<p style=\"text-align: center\">\n<p><strong>4\u5219Android UI\u7684\u8bbe\u8ba1\u54f2\u5b66:<\/strong><\/p>\n<p>\u25c6\u5e72\u51c0\u800c\u4e0d\u8fc7\u4e8e\u7b80\u5355<\/p>\n<p>\u25c6\u5173\u6ce8\u5185\u5bb9\u800c\u975e\u4fee\u9970<\/p>\n<p>\u25c6\u4fdd\u5b58\u4e00\u81f4\uff0c\u8ba9\u7528\u6237\u5bb9\u6613\u6295\u5165\u5176\u4e2d\uff0c\u53ef\u9644\u52a0\u5c11\u8bb8\u53d8\u5316<\/p>\n<p>\u25c6\u4f7f\u7528\u4e91\u7aef\u670d\u52a1\uff08\u5b58\u50a8\u548c\u540c\u6b65\u7528\u6237\u8d44\u6599\uff09\u6765\u52a0\u5f3a\u7528\u6237\u4f53\u9a8c<\/p>\n<p>#p#<\/p>\n<p><strong>\u4f18\u79c0\u754c\u9762\u7684\u8bbe\u8ba15\u6761\u51c6\u5219:<\/strong><\/p>\n<p>\u25c6\u5173\u6ce8\u7528\u6237<\/p>\n<p>\u25c6\u663e\u793a\u6b63\u786e\u7684\u5185\u5bb9<\/p>\n<p>\u25c6\u7ed9\u4e88\u7528\u6237\u9002\u5f53\u7684\u56de\u9988<\/p>\n<p>\u25c6\u6709\u7ae0\u53ef\u5faa\u7684\u884c\u4e3a\u6a21\u5f0f<\/p>\n<p>\u25c6\u5bb9\u5fcd\u9519\u8bef<\/p>\n<p style=\"text-align: center\">\n<p><strong>\u5173\u6ce8\u7528\u6237\uff1a<\/strong><\/p>\n<p>\u25c6\u4e86\u89e3\u4f60\u7684\u7528\u6237\uff08\u5e74\u9f84\uff0c\u6280\u80fd\uff0c\u6587\u5316\uff0c\u5bf9\u4f60\u7684\u5e94\u7528\u7684\u9700\u6c42\uff0c\u4f7f\u7528\u7684\u8bbe\u5907\uff0c\u4f55\u65f6\u4f55\u5730\u5982\u4f55\u4f7f\u7528\u8bbe\u5907\uff09<\/p>\n<p>\u25c6\u2018\u7528\u6237\u4f18\u5148\u2019\u7684\u8bbe\u8ba1\u5fc3\u6001 \uff08\u7528\u6237\u901a\u5e38\u662f\u4efb\u52a1\u5bfc\u5411\u7684\u884c\u4e3a\u6a21\u5f0f\uff09<\/p>\n<p>\u25c6\u66f4\u65e9\uff0c\u66f4\u9891\u7e41\u7684\u7531\u771f\u5b9e\u7528\u6237\u6765\u6d4b\u8bd5<\/p>\n<p style=\"text-align: center\">&nbsp;<\/p>\n<p><strong>\u663e\u793a\u6b63\u786e\u7684\u5185\u5bb9\uff1a<\/strong><\/p>\n<p>\u25c6\u6700\u5e38\u7528\u7684\u64cd\u4f5c\u9700\u8981\u6700\u5feb\u88ab\u7528\u6237\u770b\u5230\u5e76\u4e14\u53ef\u7528<\/p>\n<p>\u25c6\u4e0d\u592a\u5e38\u7528\u7684\u529f\u80fd\u53ef\u4ee5\u653e\u5230\u83dc\u5355\u91cc\u9762<\/p>\n<p style=\"text-align: center\">&nbsp;<\/p>\n<p><strong>\u7ed9\u4e88\u7528\u6237\u9002\u5f53\u7684\u56de\u9988\uff1a<\/strong><\/p>\n<p>\u25c6\u4ea4\u4e92\u5f0f\u7684UI\u5143\u7d20\u6700\u5c11\u9700\u8981\u53cd\u6620\u51fa4\u79cd\u4e0d\u540c\u7684\u72b6\u6001 \uff08default\uff0cdisabled\uff0cfocused\uff0cpressed\uff09<\/p>\n<p>\u25c6\u4fdd\u8bc1\u64cd\u4f5c\u7684\u7ed3\u679c\u662f\u6e05\u6670\u53ef\u89c1\u7684<\/p>\n<p>\u25c6\u591a\u7ed9\u4e88\u7528\u6237\u8fdb\u5ea6\u63d0\u793a\uff0c\u4f46\u662f\u4e0d\u8981\u5e72\u6270\u4ed6\u4eec\u5f53\u524d\u7684\u64cd\u4f5c<\/p>\n<p style=\"text-align: center\">&nbsp;<\/p>\n<p style=\"text-align: center\">\n<p><strong>&nbsp;\u6709\u7ae0\u53ef\u5faa\u7684\u884c\u4e3a\u6a21\u5f0f\uff1a<\/strong><\/p>\n<p>\u25c6\u884c\u4e3a\u6a21\u5f0f\u9075\u5faa\u7528\u6237\u7684\u671f\u671b\uff08\u6b63\u786e\u7684\u64cd\u4f5c\u6d3b\u52a8\u5806\u6808\uff0c\u663e\u793a\u7528\u6237\u671f\u671b\u770b\u5230\u7684\u4fe1\u606f\u548c\u52a8\u4f5c\uff09<\/p>\n<p>\u25c6\u4f7f\u7528\u5408\u9002\u7684\u65b9\u5f0f\u6765\u52a0\u5f3a\u529f\u80fd\u53ef\u89c1\u6027\uff08\u53ef\u70b9\u51fb\u7684\u5143\u7d20\u5c31\u5e94\u8be5\u770b\u8d77\u6765\u662f\u53ef\u4ee5\u70b9\u51fb\u7684\uff09<\/p>\n<p>\u25c6\u5982\u679c\u7528\u6237\u5b8c\u6210\u4e00\u9879\u4efb\u52a1\u9700\u8981\u590d\u6742\u7684\u64cd\u4f5c\uff0c\u91cd\u65b0\u601d\u8003\u4f60\u7684\u8bbe\u8ba1!!!<\/p>\n<p style=\"text-align: center\">&nbsp;<\/p>\n<p><strong>\u5bb9\u5fcd\u9519\u8bef\uff1a<\/strong><\/p>\n<p>\u25c6\u53ea\u5141\u8bb8\u6709\u610f\u4e49\u7684\u64cd\u4f5c\uff08\u9002\u5f53\u7981\u7528\u4e00\u4e9b\u6309\u94ae\uff09<\/p>\n<p>\u25c6\u5c3d\u91cf\u51cf\u5c11\u4e0d\u53ef\u56de\u9000\u7684\u64cd\u4f5c<\/p>\n<p>\u25c6\u5141\u8bb8\u56de\u9000\uff08undo\uff09\u6bd4\u4f7f\u7528\u786e\u5b9a\u5bf9\u8bdd\u6846\u66f4\u597d\uff08\u5b9e\u9645\u4e0a\uff0c\u5e94\u8be5\u5c3d\u91cf\u5c11\u7528\u786e\u5b9a\u5bf9\u8bdd\u6846\uff0c\u5b83\u5bf9\u7528\u6237\u662f\u4e00\u79cd\u5e72\u6270\uff09<\/p>\n<p>#p#<\/p>\n<p style=\"text-align: center\">\n<p>\u201c\u5982\u679c\u9519\u8bef\u662f\u53ef\u80fd\u53d1\u751f\u7684\uff0c\u90a3\u5b83\u5c31\u4e00\u5b9a\u4f1a\u53d1\u751f\u3002\u201d<\/p>\n<p style=\"text-align: right\">\u2014\u2014<strong>Donald Norman<\/strong>, The Design of Everyday Things \u4f5c\u8005<\/p>\n<p style=\"text-align: center\">\n<p><strong>\u8bbe\u8ba1\u9700\u8981\u8003\u91cf\u76848\u5730\u65b9\uff1a<\/strong><\/p>\n<p>\u25c6\u5c4f\u5e55\u7684\u7269\u7406\u5c3a\u5bf8<\/p>\n<p>\u25c6\u5c4f\u5e55\u5bc6\u5ea6<\/p>\n<p>\u25c6\u5c4f\u5e55\u7684\u65b9\u5411\uff08\u7ad6\u5411\u548c\u6a2a\u5411\uff09<\/p>\n<p>\u25c6\u4e3b\u8981\u7684UI\u4ea4\u4e92\u65b9\u5f0f\uff08\u89e6\u5c4f\u8fd8\u662f\u4f7f\u7528D-pad\/trackball\uff09<\/p>\n<p>\u25c6\u8f6f\u952e\u76d8\u8fd8\u662f\u7269\u7406\u952e\u76d8<\/p>\n<p style=\"text-align: center\">\n<p>\u25c6\u4e86\u89e3\u4e0d\u540c\u8bbe\u5907\u4e4b\u95f4\u7684\u76f8\u5f02\u4e4b\u5904\u662f\u975e\u5e38\u91cd\u8981\u7684!<\/p>\n<p>\u25c6\u9605\u8bfbCDD\uff0c\u5b66\u4e60\u8bbe\u5907\u53ef\u80fd\u5dee\u5f02\u7684\u5730\u65b9<\/p>\n<p>\u25c6\u4e86\u89e3\u5c4f\u5e55\u5c3a\u5bf8\u548c\u5bc6\u5ea6\u5206\u7c7b<\/p>\n<p>&nbsp;#p#<\/p>\n<p><span style=\"font-size: larger\"><strong>Android UI \u6846\u67b6\u7279\u6027<\/strong><\/span><\/p>\n<p style=\"text-align: center\">\n<p>\u4f60\u5fc5\u987b\u4e86\u89e3\uff08\u4f7f\u7528\uff09\u7684 UI \u6846\u67b6\u7279\u6027\u3002<\/p>\n<p style=\"text-align: center\">\n<p>\u4f7f\u7528\u76f8\u5bf9\u5e03\u5c40\u7ba1\u7406\u754c\u9762\u5143\u7d20\u3002<\/p>\n<p>\u8bd1\u8005\u6ce8\uff1a\u76f8\u5bf9\u5e03\u5c40\u548c\u7ebf\u6027\u5e03\u5c40\u662fAndroid\u91cc\u9762\u5e38\u7528\u7684\u4e24\u79cd\u5e03\u5c40\uff0c\u7ebf\u6027\u5e03\u5c40\u6bd4\u8f83\u7b80\u5355\uff0c\u800c\u76f8\u5bf9\u5e03\u5c40\u53ef\u4ee5\u505a\u51fa\u6bd4\u8f83\u590d\u6742\u7684\u5e03\u5c40\u7ba1\u7406\uff0c\u6240\u4ee5\u4ec5\u4ec5\u4e86\u89e3\u7ebf\u6027\u5e03\u5c40\uff0c\u5f88\u591a\u65f6\u5019\u662f\u4e0d\u591f\u7684\u3002\u4e0d\u8fc7\u4ee5\u4f5c\u8005\u4e4b\u524dQt\u7684\u7ecf\u9a8c\u6765\u770b\uff0cAndroid\u91cc\u9762\u7684\u5e03\u5c40\u7ba1\u7406\u529f\u80fd\u90fd\u6bd4\u8f83\u9633\u6625\u4e5f\u4e0d\u592a\u5bb9\u6613\u4f7f\u7528\uff0c\u4e0d\u8fc7\u8fd9\u53ef\u80fd\u662f\u8ddf\u79fb\u52a8\u5e73\u53f0\u7684\u6027\u80fd\u8003\u91cf\u6709\u5173\u7cfb\u3002<\/p>\n<p>#p#<\/p>\n<p><span style=\"font-size: larger\"><strong>\u5408\u7406\u4f7f\u7528\u8d44\u6e90\u4fee\u9970\u7b26<\/strong><\/span><\/p>\n<p style=\"text-align: center\">\n<p><strong>\u4f7f\u7528\u8d44\u6e90\u4fee\u9970\u7b26\u6765\u4fee\u9970\u540c\u4e00\u5957\u8d44\u6e90\u7684\u591a\u4e2a\u4e0d\u540c\u7248\u672c\u3002<\/strong><\/p>\n<p>\u25c6\u4e00\u4e2aapk\u5305\u91cc\u9762\u4f1a\u5305\u542b\u6240\u6709\u7684\u8d44\u6e90\u6587\u4ef6\u3002<\/p>\n<p>\u25c6\u7cfb\u7edf\u5728\u8fd0\u884c\u65f6\u4f1a\u6839\u636e\u8f6f\u786c\u4ef6\u73af\u5883\u6765\u81ea\u52a8\u9009\u62e9\u76f8\u5e94\u4fee\u9970\u7b26\u7248\u672c\u7684\u8d44\u6e90\u3002<\/p>\n<p>\u8bd1\u8005\u6ce8\uff1a\u6700\u5e38\u7528\u7684\u4fee\u9970\u7b26\u53ef\u80fd\u662flocale\u4fee\u9970\u7b26\uff08\u5236\u4f5c\u591a\u8bed\u6587\u672c\uff09\uff0cdpi\u4fee\u9970\u7b26\uff08\u4e3a\u4e0d\u540c\u5bc6\u5ea6\u7684\u5c4f\u5e55\u5236\u4f5c\u4e0d\u540c\u5c3a\u5bf8\u7684\u56fe\u6807\u548c\u76ae\u80a4\uff09\uff0corientation\u4fee\u9970\u7b26\uff08\u4e3a\u6a2a\u5c4f\u548c\u7ad6\u5c4f\u63d0\u4f9b\u4e0d\u540c\u7684UI\u5e03\u5c40\uff09\u3002\u5982\u679c\u7cfb\u7edf\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u4fee\u9970\u7b26\u7248\u672c\uff0c\u5b83\u5c31\u4f1a\u9009\u62e9\u65e0\u4fee\u9970\u7b26\u7684\u7248\u672c\uff0c\u8fd9\u4e2a\u7248\u672c\u901a\u5e38\u4e5f\u662f\u6240\u8c13\u7684\u9ed8\u8ba4\u9009\u62e9\u3002<\/p>\n<p>#p#<\/p>\n<p><span style=\"font-size: larger\"><strong>9-patch drawables <\/strong><\/span><\/p>\n<p style=\"text-align: center\">\n<p><strong>\u4f7f\u7528 9-patch drawables \u2013 foo.9.png<\/strong><\/p>\n<p>\u25c69-patch drawables \u7684\u8bed\u6cd5\u8ddfCSS3 border image \u7c7b\u4f3c<\/p>\n<p>\u25c6\u6839\u636e\u8fb9\u7f18\u7684\u50cf\u7d20\u5bbd\u5ea6\u5207\u5272\u51fa\u4e0d\u540c\u7684\u62c9\u4f38\u533a\u57df<\/p>\n<p>\u25c6***\u540c\u65f6\u63d0\u4f9b mdpi \u548c hdpi \u7684\u7248\u672c<\/p>\n<p>\u8bd1\u8005\u6ce8\uff1adrawables \u5728 Android \u91cc\u9762\u8ddf WPF \u91cc\u9762\u7684 Drawing \u7c7b\u4f3c\uff0c\u7528\u4e8e\u5b9a\u4e49\u4e00\u4e2a\u53ef\u7ed8\u5236\u7684\u5bf9\u8c61\uff0c\u5305\u62ec\u4f4d\u56fe\uff0c\u5237\u5b50\uff0c\u586b\u5145\u989c\u8272\u6216\u8005\u4ee5\u4e0a\u7269\u4ef6\u7684\u7ec4\u5408\u7b49\u7b49\u3002\u6240\u8c13 9-patch drawables\uff0c\u5c31\u662f\u5c06\u4e00\u4e2a drawable \u6309\u7167\u5b9a\u4e49\u7684 4 \u4e2a\u8fb9\u7f18\u7684\u5bbd\u5ea6\u5927\u5c0f\u5207\u5272\u62109\u4e2a\u533a\u57df\uff0c\u5305\u62ec4\u4e2a\u89d2\u843d\uff0c4\u6761\u8fb9\u7f18\u548c\u4e00\u4e2a\u4e2d\u5fc3\u533a\u57df\uff0c\u5f53\u628a\u8fd9\u4e2a drawable \u7ed8\u5236\u5230\u4e00\u4e2a\u4efb\u610f\u77e9\u5f62\u533a\u57df\u65f6\uff0cdrawable \u7684\u5404\u4e2a\u533a\u57df\u6709\u4e0d\u540c\u7684\u62c9\u4f38\u63a7\u5236\uff08\u89d2\u843d\u4e0d\u62c9\u4f38\uff0c\u6a2a\u8fb9\u6a2a\u5411\u62c9\u4f38\uff0c\u7ad6\u8fb9\u7ad6\u5411\u62c9\u4f38\uff0c\u4e2d\u5fc3\u533a\u57df\u6a2a\u7ad6\u5411\u90fd\u62c9\u4f38\uff09\u3002\u901a\u5e38\u4f7f\u7528 9-patch drawable \u4e00\u822c\u662f\u4e3a\u4e86\u7ed8\u5236\u51fa\u6bd4\u8f83\u6f02\u4eae\u7684\u5e26\u5706\u89d2\u80cc\u666f\uff0c\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5706\u89d2\u53ca\u8fb9\u7f18\u88ab\u4efb\u610f\u62c9\u4f38\u5bfc\u81f4\u53d8\u5f62\u3002\u5f53\u7136\uff0c\u5982\u679c\u4f60\u7684\u7a0b\u5e8f\u91cc\u9762\u7ed8\u5236\u7684\u56fe\u50cf\u548c\u76ee\u6807\u533a\u57df\u5927\u5c0f\u5b8c\u5168\u4e00\u6837\uff0c\u5c31\u4e0d\u9700\u8981\u90a3\u4e48\u9ebb\u70e6\uff0c\u4e0d\u8fc7\u4ee5 Android \u7684\u72b6\u51b5\u6765\u8bf4\uff0c\u4e3a\u4e86\u9002\u5e94\u591a\u79cd\u8bbe\u5907\uff0c***\u4e0d\u8981\u4e8b\u5148\u5047\u8bbe\u76ee\u6807\u533a\u57df\u7684\u50cf\u7d20\u5927\u5c0f\u3002<\/p>\n<p>#p#<\/p>\n<p><span style=\"font-size: larger\"><strong>\u4f7f\u7528\u72b6\u6001\u5217\u8868\u548c\u591a\u5c42\u53e0\u52a0\u6765\u5236\u4f5c\u5177\u5907\u590d\u6742\u6548\u679c\u7684\u53ef\u7ed8\u5236\u56fe\u50cf<\/strong><\/span><\/p>\n<p style=\"text-align: center\">\n<p style=\"text-align: center\">\n<p>\u4f7f\u7528 Selector (state list) drawables \uff08\u72b6\u6001\u5217\u8868\uff09\u6765\u63d0\u4f9b\u4e0d\u540c\u72b6\u6001\uff08normal\uff0cdisabled\uff0cfocused\uff0cpressed\u2026\uff09\u4e0b\u7684\u7ed8\u5236\u56fe\u50cf\u3002<\/p>\n<p style=\"text-align: center\">\n<p style=\"text-align: center\">\n<p>\u4f7f\u7528 Layer drawables \uff08\u591a\u5c42\u53e0\u52a0\uff09\u6765\u5236\u4f5c\u5177\u5907\u590d\u6742\u6548\u679c\u7684\u53ef\u7ed8\u5236\u56fe\u50cf\u3002<\/p>\n<p>\u8bd1\u8005\u6ce8\uff1a\u6240\u8c13\u591a\u5c42\u53e0\u52a0\uff0c\u4f7f\u7528PS\u6765\u5236\u4f5c\u56fe\u6807\u548c\u76ae\u80a4\u7684\u540c\u5b66\u53ef\u80fd\u90fd\u6e05\u695a\uff0c\u6bd4\u5982\u8bf4\u4e00\u4e2a\u6309\u94ae\u7684PS\u6a21\u677f\u901a\u5e38\u4f1a\u5305\u62ec\u6240\u8c13\u7684background\u5c42\u5b9a\u4e49\u5e95\u8272\uff0cmask\u5c42\u5b9a\u4e49\u8f6e\u5ed3\uff0cshine\u5c42\u5b9a\u4e49\u524d\u666f\u7684\u9ad8\u4eae\u6548\u679c\u3002\u800c Android \u91cc\u9762\u5141\u8bb8\u4f60\u76f4\u63a5\u5728 XML \u811a\u672c\u91cc\u9762\u4f7f\u7528 Layer drawables \u7684\u8bed\u6cd5\u6765\u5b9a\u4e49\u4e0a\u8ff0\u7684\u591a\u5c42\u53e0\u52a0\u6548\u679c\uff0c\u8fd9\u6837\u53ef\u80fd\u6bd4\u5728PS\u91cc\u9762\u76f4\u63a5\u505a\u597d\u8981\u66f4\u7075\u6d3b\u4e00\u4e9b\uff0c\u5e76\u4e14\u6709\u7684\u5c42\u53ef\u4ee5\u662f\u6765\u81eapng\u4f4d\u56fe\uff0c\u6709\u7684\u5c42\u53ef\u4ee5\u662f\u76f4\u63a5\u901a\u8fc7 XML \u811a\u672c\u751f\u6210\uff08\u6bd4\u5982\u7eaf\u8272\uff0c\u8fc7\u6e21\u8272\u7b49\u7b49\uff09\u3002<\/p>\n<p>\u3010\u7f16\u8f91\u63a8\u8350\u3011<\/p>\n<ol>\n<li>MeeGo\u79fb\u52a8\u7ec8\u7aef\u8bbe\u5907\u5f00\u53d1UI\u8bbe\u8ba1\u57fa\u7840\u6559\u7a0b<\/li>\n<li>\u56fe\u6587\u5e76\u8302 \u5728MyEclipse 8.6\u4e0a\u642d\u5efaAndroid\u5f00\u53d1\u73af\u5883<\/li>\n<li>Android\u5f00\u53d1\u5fc5\u5907\u768421\u4e2a\u514d\u8d39\u8d44\u6e90\u548c\u5de5\u5177<\/li>\n<li>\u72ec\u5bb6\u4e13\u8bbf\uff1aAndroid\u5f00\u53d1\u5165\u95e8\u95ee\u4e0e\u7b54<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u66fe\u7ecf\u7ed9\u5927\u5bb6\u4e00\u4e2a\u300aMeeGo\u79fb\u52a8\u7ec8\u7aef\u8bbe\u5907\u5f00\u53d1UI\u8bbe\u8ba1\u57fa\u7840\u6559\u7a0b\u300b\uff0c\u540c\u65f6\u5f88\u591a\u670b\u53cb\u90fd\u5728\u5bfb\u627eAndroid UI\u5f00\u53d1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":203695,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[195111],"tags":[],"class_list":["post-203694","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/203694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=203694"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/203694\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media\/203695"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=203694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=203694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=203694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}