
{"id":261,"date":"2016-03-29T10:09:41","date_gmt":"2016-03-29T02:09:41","guid":{"rendered":"http:\/\/www.jiandaima.com\/blog\/?p=261"},"modified":"2016-11-07T10:39:44","modified_gmt":"2016-11-07T02:39:44","slug":"%e4%b8%80%e6%ac%be%e6%af%9b%e7%8e%bb%e7%92%83%e6%95%88%e6%9e%9c%e7%9a%84%e8%a7%a3%e9%94%81%e7%95%8c%e9%9d%a2%e3%80%82-%e5%ae%89%e5%8d%93%e6%ba%90%e7%a0%81","status":"publish","type":"post","link":"http:\/\/www.jiandaima.com\/blog\/archives\/261.html","title":{"rendered":"\u4e00\u6b3e\u6bdb\u73bb\u7483\u6548\u679c\u7684\u89e3\u9501\u754c\u9762\u3002-\u5b89\u5353\u6e90\u7801"},"content":{"rendered":"<div align=\"left\">\u6e90\u7801\u540d\u79f0\uff1a\u4e00\u6b3e\u6bdb\u73bb\u7483\u6548\u679c\u7684\u89e3\u9501\u754c\u9762\u3002-\u5b89\u5353\u6e90\u7801<\/div>\n<div align=\"left\">\u6e90\u7801\u7c7b\u578b\uff1a\u5b89\u5353\u6e90\u7801<\/div>\n<div align=\"left\">\u6e90\u7801\u5927\u5c0f\uff1a1MB<\/div>\n<div align=\"left\">\u6e90\u7801\u6807\u7b7e\uff1a\u5b89\u5353\u89e3\u9501\uff0c\u6bdb\u73bb\u7483\u6548\u679c\uff0c\u5b89\u5353\u7279\u6548<\/div>\n<div align=\"left\">\u6e90\u7801\u7b49\u7ea7\uff1a\u2605\u2605\u2605\u2606\u2606<\/div>\n<p><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;\"><span style=\"color: #333333;\">\u6e90\u7801\u7b80\u4ecb\uff1a<\/span><\/span><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;\"><span style=\"color: #333333;\">\u4f7f\u7528\u4e86500px-android-blur\u7684\u6bdb\u73bb\u7483\u6548\u679c\u3002\uff0c<\/span><\/span>\u4f1a\u6dfb\u52a0\u66f4\u591a\u663e\u793a\u3001\u9690\u85cfBlurLockView\u7684\u52a8\u753b\u3002\u5728demo\u91cc\uff0c\u4f7f\u7528\u4e86Material-Dialogs\u4ee5\u4fbf\u8c03\u6574\u989c\u8272\u3002<\/p>\n<p>\u6e90\u7801\u622a\u56fe\uff1a<br \/>\n<img decoding=\"async\" src=\"http:\/\/i4.piimg.com\/2ea93fc8cfc14e4b.gif\" alt=\"\" border=\"0\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/i4.piimg.com\/214cda8f8c7c2cb3.gif\" alt=\"\" border=\"0\" \/><\/p>\n<p><span style=\"color: #333333;\">\u6bdb\u73bb\u7483\u6548\u679c\u7684\u89e3\u9501\u754c\u9762\u3002<\/span><br \/>\n\u4e0b\u8f7ddemo:<a href=\"http:\/\/fir.im\/yakc\" target=\"_blank\">http:\/\/fir.im\/yakc<\/a><\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5\uff1a<br \/>\n<span style=\"color: #333333;\">\u6dfb\u52a0\u5230module\u7684build.gradle\u4e2d<\/span><\/p>\n<div>\n<blockquote><p>dependencies {<br \/>\n...<br \/>\ncompile 'com.nightonke:blurlockview:1.0.0'<br \/>\n...<br \/>\n}<\/p><\/blockquote>\n<\/div>\n<p><strong>\u5feb\u901f\u4f7f\u7528<\/strong><\/p>\n<div align=\"left\"><span style=\"color: #333333;\">\u52a0\u5165\u5230xml\u4e2d\uff1a<\/span><\/div>\n<p>&nbsp;<\/p>\n<div>\n<blockquote><p>&lt;com.nightonke.blurlockview.BlurLockView<br \/>\nandroid:id=\"@+id\/blurlockview\"<br \/>\nandroid:layout_width=\"match_parent\"<br \/>\nandroid:layout_height=\"match_parent\"<br \/>\n\/&gt;<\/p><\/blockquote>\n<\/div>\n<div align=\"left\"><span style=\"color: #333333;\">\u6ce8\u610fBlurLockView\u5e94\u8be5\u653e\u7f6e\u5728\u9700\u8981\u88ab\u8986\u76d6\u7684\u63a7\u4ef6\u7684\u6b63\u4e0a\u65b9\uff0c\u4e5f\u5c31\u662f\u8986\u76d6\u5176\u4ed6\u63a7\u4ef6\u3002<\/span><\/div>\n<div align=\"left\"><span style=\"color: #333333;\">\u52a0\u5165\u4ee5\u4e0b\u4ee3\u7801\u5373\u53ef\u4f7f\u7528\uff1a<\/span><\/div>\n<p>&nbsp;<\/p>\n<div>\n<blockquote><p>\/\/ Set the view that need to be blurred<br \/>\nblurLockView.setBlurredView(imageView1);<\/p>\n<p>\/\/ Set the password<br \/>\nblurLockView.setCorrectPassword(getIntent().getStringExtra(\"PASSWORD\"));<\/p><\/blockquote>\n<\/div>\n<p><strong>\u663e\u793a\u548c\u9690\u85cf<\/strong><\/p>\n<div align=\"left\"><span style=\"color: #333333;\">\u4f60\u53ef\u4ee5\u9009\u62e9\u663e\u793a\u6216\u9690\u85cf\u7684\u65f6\u5ef6\u3001\u65b9\u5f0f\u3001\u7f13\u52a8\u51fd\u6570\u3002 \u6bd4\u5982\uff0c\u672c\u6587\u5f00\u5934\u7684gif\u4ee5ShowType.FADE_IN\u4e3a\u65b9\u5f0f\uff0c\u4ee51000ms\u4e3a\u65f6\u5ef6\u6765\u663e\u793a\uff0c\u4ee5HideType.FADE_OUT\u4e3a\u65b9\u5f0f\uff0c\u4ee51000ms\u4e3a\u65f6\u5ef6\u6765\u9690\u85cf\u3002 \u4f60\u53ef\u4ee5\u5728demo\u4e2d\u5c1d\u8bd5\u5404\u79cd\u6548\u679c\u3002<\/span><\/div>\n<p><strong>\u6bdb\u73bb\u7483\u6548\u679c<\/strong><\/p>\n<div align=\"left\"><span style=\"color: #333333;\">\u4f60\u53ef\u4ee5\u4f7f\u7528\u4e09\u79cd\u4e0d\u540c\u7684\u53c2\u6570\u6765\u8c03\u6574\u6bdb\u73bb\u7483\u6548\u679c\uff1a<br \/>\n1. \u7528setDownsampleFactor(int downsampleFactor)\u6765\u8c03\u6574<strong>DownsampleFactor<\/strong>\uff0c\u5176\u503c\u8d8a\u5c0f\uff0c\u6bdb\u73bb\u7483\u6548\u679c\u8d8a\u6de1\u3002<br \/>\n2. \u7528setBlurRadius(int blurRadius)\u6765\u8c03\u6574<strong>BlurRadius<\/strong>\uff0c\u5176\u503c\u8d8a\u5c0f\uff0c\u6bdb\u73bb\u7483\u6548\u679c\u8d8a\u6de1\u3002<br \/>\n3. \u7528setOverlayColor(int color)\u6765\u8c03\u6574<strong>OverlayColor<\/strong>\uff0c\u53ef\u4ee5\u6539\u53d8\u6bdb\u73bb\u7483\u6548\u679c\u989c\u8272\u3002<\/span><\/div>\n<p><span style=\"color: #333333;\"><br \/>\n<\/span>\u6e90\u7801\u4e0b\u8f7d\uff1a<\/p>\n<p><a href=\"http:\/\/bbs.jiandaima.com\/thread-236-1-1.html\">\u4e00\u6b3e\u6bdb\u73bb\u7483\u6548\u679c\u7684\u89e3\u9501\u754c\u9762\u3002-\u5b89\u5353\u6e90\u7801<\/a><br \/>\nhttp:\/\/bbs.jiandaima.com\/thread-236-1-1.html<br \/>\n<span style=\"color: #333333;\"><br \/>\n<\/span><\/p>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u6e90\u7801\u540d\u79f0\uff1a\u4e00\u6b3e\u6bdb\u73bb\u7483\u6548\u679c\u7684\u89e3\u9501\u754c\u9762\u3002-\u5b89\u5353\u6e90\u7801\uff0c\u6e90\u7801\u6807\u7b7e\uff1a\u5b89\u5353\u89e3\u9501\uff0c\u6bdb\u73bb\u7483\u6548\u679c\uff0c\u5b89\u5353\u7279\u6548\uff0c\u6e90\u7801\u7b49\u7ea7\uff1a\u2605\u2605\u2605\u2606\u2606,\u5b89\u5353iOS\u6bd5\u8bbe\u6e90\u7801\u4e0b\u8f7d<\/p>\n","protected":false},"author":1,"featured_media":522,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[18,141,47],"class_list":["post-261","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application-source-code","tag-android","tag-ios","tag-47"],"post_thumbnail_image":"http:\/\/images.jiandaima.com\/blog\/wp-content\/uploads\/2016\/05\/64022-3.png?imageView2\/1\/w\/300\/h\/300#","content_first_image":"http:\/\/i4.piimg.com\/2ea93fc8cfc14e4b.gif","post_medium_image_300":"http:\/\/images.jiandaima.com\/blog\/wp-content\/uploads\/2016\/05\/64022-3.png?imageView2\/1\/w\/600\/h\/356#","post_thumbnail_image_624":"http:\/\/images.jiandaima.com\/blog\/wp-content\/uploads\/2016\/05\/64022-3.png","post_frist_image":"http:\/\/i4.piimg.com\/2ea93fc8cfc14e4b.gif","post_medium_image":"http:\/\/images.jiandaima.com\/blog\/wp-content\/uploads\/2016\/05\/64022-3.png?imageView2\/1\/w\/600\/h\/356#","post_large_image":"http:\/\/images.jiandaima.com\/blog\/wp-content\/uploads\/2016\/05\/64022-3.png","post_full_image":"http:\/\/images.jiandaima.com\/blog\/wp-content\/uploads\/2016\/05\/64022-3.png","post_all_images":[{"imagesurl":"http:\/\/i4.piimg.com\/2ea93fc8cfc14e4b.gif","id":"image0"},{"imagesurl":"http:\/\/i4.piimg.com\/214cda8f8c7c2cb3.gif","id":"image1"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":5,"total_comments":2,"category_name":"\u5e94\u7528\u7a0b\u5e8f\u6e90\u7801","post_date":"2016-03-29","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"http:\/\/images.jiandaima.com\/blog\/wp-content\/uploads\/2020\/02\/img_5e44112722964.png","avatarurls":[],"related_posts":[],"pageviews":694,"next_post_id":382,"next_post_title":"Android\u77ed\u4fe1\u6536\u5230\uff0c\u8bed\u97f3\u64ad\u62a5","previous_post_id":259,"previous_post_title":"\u4e00\u6b3e\u7eda\u4e3d\u7684\u83dc\u5355\uff0c\u62e5\u6709\u4e2a\u5404\u79cd\u6837\u5f0f\u548c\u52a8\u753b","_links":{"self":[{"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/posts\/261","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/comments?post=261"}],"version-history":[{"count":0,"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/media\/522"}],"wp:attachment":[{"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jiandaima.com\/blog\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}