{"id":796,"date":"2020-10-05T14:49:09","date_gmt":"2020-10-05T06:49:09","guid":{"rendered":"https:\/\/badgameshow.com\/fly\/?p=796"},"modified":"2023-04-06T16:43:35","modified_gmt":"2023-04-06T08:43:35","slug":"android-%e5%88%a9%e7%94%a8glide%e5%8f%96%e5%be%97bitmap-%e6%8a%8abitmap%e9%a1%af%e7%a4%ba%e7%82%ba%e5%9c%93%e5%bd%a2%e8%83%8c%e6%99%af","status":"publish","type":"post","link":"https:\/\/badgameshow.com\/fly\/android-%e5%88%a9%e7%94%a8glide%e5%8f%96%e5%be%97bitmap-%e6%8a%8abitmap%e9%a1%af%e7%a4%ba%e7%82%ba%e5%9c%93%e5%bd%a2%e8%83%8c%e6%99%af\/","title":{"rendered":"Android \u5229\u7528Glide\u53d6\u5f97Bitmap \u628aBitmap\u986f\u793a\u70ba\u5713\u5f62\u80cc\u666f"},"content":{"rendered":"<h4>1.\u5c0e\u5165Glide<\/h4>\n<pre><code class=\"language-Gradle line-numbers\">implementation 'com.github.bumptech.glide:glide:4.15.1'\n<\/code><\/pre>\n<h4>2.\u8072\u660e\u7db2\u8def\u6b0a\u9650<\/h4>\n<pre><code class=\"language-XML line-numbers\">&lt;uses-permission android:name=\"android.permission.INTERNET\"\/&gt;\n<\/code><\/pre>\n<h4>3.\u53d6\u5f97Bitmap<\/h4>\n<pre><code class=\"language-Kotlin line-numbers\"> Glide.with(this)\n      .asBitmap()\n      .load(\"https:\/\/b.blog.xuite.net\/b\/b\/5\/2\/11519069\/blog_78644\/txt\/243420413\/4.jpg\")\n      .into(object : CustomTarget&lt;Bitmap&gt;() {\n           override fun onLoadCleared(placeholder: Drawable?) {}\n\n           override fun onResourceReady(bitmap: Bitmap, transition: Transition&lt;in Bitmap&gt;?) {\n               val roundedBitmapDrawable = RoundedBitmapDrawableFactory.create(resources, bitmap)\n               roundedBitmapDrawable.isCircular = true\n               icon.setImageDrawable(roundedBitmapDrawable)\n            }\n})\n<\/code><\/pre>\n<h4>4.\u6548\u679c\u5c55\u793a<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/badgameshow.com\/fly\/wp-content\/uploads\/2020\/10\/120821983_1177881085939183_7377145378888412896_n.jpg\" alt=\"\" \/><\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>1.\u5c0e\u5165Glide implementation &#8216;com.github.bumptech.glide:gli &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"pgc_sgb_lightbox_settings":"","footnotes":""},"categories":[5],"tags":[13,124,15],"class_list":["post-796","post","type-post","status-publish","format-standard","hentry","category-android","tag-android","tag-glide","tag-kotlin"],"_links":{"self":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/comments?post=796"}],"version-history":[{"count":2,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/796\/revisions"}],"predecessor-version":[{"id":1897,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/posts\/796\/revisions\/1897"}],"wp:attachment":[{"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/media?parent=796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/categories?post=796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/badgameshow.com\/fly\/wp-json\/wp\/v2\/tags?post=796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}