{"id":165256,"date":"2020-10-02T10:42:52","date_gmt":"2020-10-02T02:42:52","guid":{"rendered":"http:\/\/4563.org\/?p=165256"},"modified":"2020-10-02T10:42:52","modified_gmt":"2020-10-02T02:42:52","slug":"%e6%b1%82%e6%8e%a8%e8%8d%90-kotlin-%e5%ae%89%e5%8d%93%e5%bc%80%e5%8f%91%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=165256","title":{"rendered":"\u6c42\u63a8\u8350 kotlin \u5b89\u5353\u5f00\u53d1\u6559\u7a0b"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6c42\u63a8\u8350 kotlin \u5b89\u5353\u5f00\u53d1\u6559\u7a0b               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sfafreshman <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h2>\u6c42\u52a9\u6b63\u6587<\/h2>\n<p>\u4e3b\u662f\u4e00\u679a\u83dc\u9e21\u5927\u5b66\u751f\uff0c\u5b89\u5353\u5f00\u53d1\u7684\u8001\u5e08\u51b3\u5b9a\u4ece\u8fd9\u5b66\u671f\u5f00\u59cb\u7528 kotlin \u6559\u5b89\u5353\u5f00\u53d1 \u4e3b\u5b89\u5353\u5f00\u53d1\u548c kotlin \u90fd\u6ca1\u63a5\u89e6\u8fc7\uff0c\u6240\u4ee5\u60f3\u81ea\u5df1\u627e\u4e00\u4efd\u6559\u7a0b\u8bfe\u5916\u5b66\u4e60\uff0c\u6c42\u6709\u4e86\u89e3\u7684\u5927\u4f6c\u4ecb\u7ecd\u4e00\u4efd\u6bd4\u8f83\u65b0\u7684<\/p>\n<blockquote>\n<p>\u56e0\u4e3a\u88ab\u4e00\u672c\u8001\u4e66\u6298\u817e\u4e86\u597d\u4e45<\/p>\n<\/blockquote>\n<h2>\u83dc\u9e21\u5410\u69fd<\/h2>\n<p>\u641c\u5230\u4e86\u5f88\u591a\u4eba\u5b89\u5229\u7684 Kotlin for android developers \u7684\u4e2d\u6587\u7248 \u7136\u540e\u53d1\u73b0\u7248\u672c\u592a\u8001\u4e86\uff0c\u91cc\u9762\u7528\u7684 anko \u5e93\u73b0\u5728\u5df2\u7ecf\u5e9f\u5f03\u4e86\u4f46\u662f\u4e5f\u8fd8\u80fd\u7528 RecyclerView \u5e93\u5df2\u7ecf\u4ece 7 \u53d8\u6210\u4e86\u5b89\u5353 x<\/p>\n<pre><code>val forecastList=findViewById(R.id.forecast_list) as RecyclerView <\/code><\/pre>\n<blockquote>\n<p>\u6539\u7528 x \u4e4b\u540e\uff0cfindviewbyid \u53c8\u62a5\u9519<\/p>\n<\/blockquote>\n<blockquote>\n<p>Inspection info: This inspection reports findviewByld calls with type casts which can be converted to findViewByld with a type parameter from Android 8.0(API level 26)<\/p>\n<\/blockquote>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/10\/20201010_5f818d015d388.png\" alt=\"\u6c42\u63a8\u8350 kotlin \u5b89\u5353\u5f00\u53d1\u6559\u7a0b\" \/><\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>15<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3635567\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dadachen1997 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u76f4\u63a5 id \u8bbf\u95ee\u4e86\u5427\uff0c\u4e0d\u9700\u8981\u505a\u7ed1\u5b9a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635568\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : danbai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             kotlin \u5b98\u65b9\u6587\u6863\u8fc7\u4e00\u904d https:\/\/www.kotlincn.net\/docs\/reference\/basic-types.html \u8bed\u6cd5\u5f88\u591a\u7cd6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635569\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 810244966 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7b2c\u4e00\u884c\u4ee3\u7801 \u7b2c\u4e09\u7248 \u5c31\u662f kotlin \u5199\u7684\uff0c\u611f\u89c9\u8fd9\u4e66\u5165\u95e8\u633a\u4e0d\u9519\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635570\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sfafreshman <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dadachen1997 \u554a\uff0c\u8fd9\u6837\u5417\uff0c\u8c22\u8c22\u5927\u4f6c\u3002\u56e0\u4e3a\u662f\u5c0f\u767d\u6240\u4ee5\u6253\u7b97\u8ddf\u7740\u4ee3\u7801\u6572\u7136\u540e\u7406\u89e3\uff0c\uff0c\u7136\u540e\u5f88\u591a\u793a\u4f8b\u4ee3\u7801\u8981\u81ea\u5df1\u53bb\u66f4\u6539\u627e\u66ff\u6362\u65b9\u6848\u5bf9\u5c0f\u767d\u5165\u95e8\u6765\u8bf4\u5c31\u6709\u70b9\u5934\u5927                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635571\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : winterbells <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @dadachen1997 ID \u4e5f\u4e0d\u63a8\u8350\u4e86\uff0c\u73b0\u5728\u63a8\u8350 view binding\uff0c\u4e5f\u5f88\u7b80\u5355                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635572\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : RickyC <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/www.twle.cn\/l\/yufei\/kotlin\/kotlin-basic-index.html                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635573\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : winterbells <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6709\u7f16\u7a0b\u8bed\u8a00\u57fa\u7840\u7684\u8bdd\uff0cKotlin \u4e0a\u624b\u5f88\u5feb\u7684<br \/>\u5b89\u5353\u5165\u95e8\u65e0\u975e\u5c31\u662f\u90a3\u4e00\u5806\u63a7\u4ef6\u7684\u7279\u6027<br \/>\u81f3\u4e8e support \u8fd8\u662f AndroidX \u90fd\u4e00\u6837\uff0c\u76f4\u63a5\u5f53\u6210 AndroidX \u5c31\u884c\u4e86\uff0c\u7edd\u5927\u90e8\u5206\u8bed\u6cd5\u90fd\u6ca1\u53d8\u3002\u5c31\u7b97\u88ab\u5e9f\u5f03\u7684\uff0c\u77ed\u65f6\u95f4\u4e5f\u53ef\u4ee5\u7528\uff0c\u5148\u719f\u6089\u4e86\u518d\u53bb\u627e\u65b0\u7684\u89e3\u51b3\u65b9\u6848                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635574\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : dcalsky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u524d\u51e0\u4e2a\u6708\u56e0\u4e3a\u8981\u505a\u4e00\u4e2a\u84dd\u7259\u901a\u8baf app\uff0c\u6240\u4ee5\u901f\u6210\u4e86\u5b89\u5353\u5f00\u53d1\uff08\u5f53\u7136\u662f\u7528 Kotlin \uff09<\/p>\n<p>\u65e2\u7136\u662f\u5927\u5b66\u751f\u90a3\u8fd8\u770b\u4ec0\u4e48\u4e2d\u6587\u5462\uff0c\u8fb9\u7ffb Jetpack \u6587\u6863\u8fb9\u505a\u4e00\u4e2a\u7535\u5f71\u8bc4\u5206\u9879\u76ee\u6700\u597d\u4e0d\u8fc7\u4e86\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635575\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hyyou2010 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             kotlin \u7684\u8bdd\uff0c\u6211\u63a8\u8350 \u201ckotlin \u5b9e\u6218.pdf + \u5b98\u7f51\u7684\u534f\u7a0b\u90e8\u5206\u201d<\/p>\n<p>\u5f88\u53ef\u80fd\u6559\u5b66\u5185\u5bb9\u662f jetpack+kotlin\uff0c\u8fd9\u4fe9\u540c\u65f6\u5b66\u7edd\u975e\u6613\u4e8b\u3002\u5982\u679c\u4f1a java \u7684\u8bdd\uff0c\u53ef\u4ee5\u5148\u5b66 jetpack+java\uff0c\u4ee5\u540e\u518d\u6539 java \u4e3a kotlin\uff0c\u628a\u96be\u70b9\u5206\u6563\u5f00\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635576\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Xusually <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Stanford CS 193A Android App Development Winter 2019<br \/>\u8fd9\u91cc CS193A \u5df2\u7ecf\u4ece Java \u5207\u6362\u6210 Kotlin \u4e86\uff0c\u5f88\u597d\u7684\u6559\u7a0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635577\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cdlnls <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e2a\u4eba\u611f\u89c9\u5b98\u65b9\u6587\u6863\u5df2\u7ecf\u5dee\u4e0d\u591a\u4e86\uff0c\u7136\u540e\u5c31\u662f\u5b66\u4e4b\u524d\u53ef\u4ee5\u628a kotlin \u8bed\u6cd5\u8fc7\u4e00\u8fc7\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635578\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JRight <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/cn.udacity.com\/course\/advanced-android-with-kotlin&#8211;ud940 <br \/>\u53ef\u4ee5\u8bd5\u8bd5\u8c37\u6b4c\u81ea\u5df1\u51fa\u7684\u514d\u8d39\u6559\u7a0b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635579\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : THP301 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5176\u4ed6\u90fd\u522b\u770b\uff0c\u76f4\u63a5\u770b\u5b98\u65b9\u6587\u6863\uff0c\u8fd9\u624d\u662f\u6377\u5f84                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635580\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lihongming <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @THP301 \u5b98\u65b9\u6587\u6863\u4e5f\u5f97\u770b\u82f1\u6587\u7248\u7684\u624d\u884c\uff0c\u90a3\u7ffb\u8bd1\u6c34\u5e73\u5e38\u5e38\u8ba9\u6211\u6000\u7591\u6211\u662f\u4e0d\u662f\u4e2a\u5047\u4e2d\u56fd\u4eba\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3635581\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 273579540 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/www.learnfk.com\/course-kotlin                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6c42\u63a8\u8350 kotlin \u5b89\u5353\u5f00\u53d1\u6559\u7a0b&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/165256"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=165256"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/165256\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=165256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=165256"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=165256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}