{"id":1468,"date":"2025-04-29T00:00:12","date_gmt":"2025-04-28T16:00:12","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/"},"modified":"2025-04-29T00:00:12","modified_gmt":"2025-04-28T16:00:12","slug":"android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/","title":{"rendered":"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3"},"content":{"rendered":"<div class=\"article_content clearfix\" id=\"article_content\">\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/kdoc_html_views-1a98987dfd.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/ck_htmledit_views-704d5b9767.css\" rel=\"stylesheet\"\/>\n<div class=\"markdown_views prism-atom-one-dark\" id=\"content_views\">\n  <svg style=\"display: none;\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n   <path d=\"M5,0 0,2.5 5,5z\" id=\"raphael-marker-block\" stroke-linecap=\"round\" style=\"-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\">\n   <\/path>\n  <\/svg><\/p>\n<h2 id=\"\u52a8\u6001\u58c1\u7eb8\">\n   \u52a8\u6001\u58c1\u7eb8<br \/>\n  <\/h2>\n<p>\n   Livewallpaper\uff08\u52a8\u6001\u58c1\u7eb8\uff09\uff1a \u9996\u5148\u52a8\u6001\u58c1\u7eb8\u5e76\u4e0d\u662fGIF\u56fe\u7247\uff0c\u800c\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u5e94\u7528\u7a0b\u5e8f,\u672c\u8d28\u662f\u4e00\u4e2aService,\u751a\u81f3\u53ef\u4ee5\u6ca1\u6709\u684c\u9762\u56fe\u6807\u3002\n  <\/p>\n<hr\/>\n<h3 id=\"\u76f4\u63a5\u770bandroidmanifestxml\">\n   \u76f4\u63a5\u770bAndroidManifest.xml<br \/>\n  <\/h3>\n<pre class=\"prettyprint\"><code class=\"language-python hljs\">&lt;?xml version=<span class=\"hljs-string\">\"1.0\"<\/span> encoding=<span class=\"hljs-string\">\"utf-8\"<\/span>?&gt;\n&lt;manifest xmlns:android=<span class=\"hljs-string\">\"http:\/\/schemas.android.com\/apk\/res\/android\"<\/span>\n    package=<span class=\"hljs-string\">\"com.qwq.clocklivewallpaper\"<\/span>&gt;\n\n    &lt;application\n        android:allowBackup=<span class=\"hljs-string\">\"true\"<\/span>\n        android:icon=<span class=\"hljs-string\">\"@drawable\/clock\"<\/span>\n        android:label=<span class=\"hljs-string\">\"@string\/app_name\"<\/span>\n        android:supportsRtl=<span class=\"hljs-string\">\"true\"<\/span>\n        android:theme=<span class=\"hljs-string\">\"@style\/AppTheme\"<\/span>&gt;\n\n        &lt;!-- \u4e3b\u754c\u9762Activity.\u53ef\u4ee5\u53bb\u6389\u3002\u52a8\u6001\u58c1\u7eb8\u5e94\u7528\u662f\u53ef\u4ee5\u5141\u8bb8\u6ca1\u6709Activity\u7684 --&gt;\n        &lt;activity android:name=<span class=\"hljs-string\">\".MainActivity\"<\/span>&gt;\n            &lt;intent-filter&gt;\n                &lt;action android:name=<span class=\"hljs-string\">\"android.intent.action.MAIN\"<\/span> \/&gt;\n                &lt;category android:name=<span class=\"hljs-string\">\"android.intent.category.LAUNCHER\"<\/span> \/&gt;\n            &lt;\/intent-filter&gt;\n        &lt;\/activity&gt;\n\n        &lt;!-- \u52a8\u6001\u58c1\u7eb8\u8bbe\u7f6e\u754c\u9762\uff0c\u53ef\u6709\u53ef\u65e0\uff0c\u4e00\u822c\u58c1\u7eb8\u5e94\u7528\u4f1a\u6709\uff0c\u4f5c\u7528\u662f\u8ba9\u7528\u6237\u81ea\u5b9a\u4e49\u52a8\u6001\u58c1\u7eb8 --&gt;\n        &lt;activity\n            android:name=<span class=\"hljs-string\">\".SettingsActivity\"<\/span>\n            android:exported=<span class=\"hljs-string\">\"true\"<\/span>\n            android:label=<span class=\"hljs-string\">\"@string\/app_name\"<\/span>&gt;\n        &lt;\/activity&gt;\n\n        &lt;!-- \u52a8\u6001\u58c1\u7eb8\u672c\u8d28\u5c31\u662fService\uff0c\u6240\u4ee5\u6b64\u7c7b\u4e3a\u52a8\u6001\u58c1\u7eb8\u6838\u5fc3--&gt;\n        &lt;service\n            android:name=<span class=\"hljs-string\">\".ClockWallpaperService\"<\/span>\n            android:enabled=<span class=\"hljs-string\">\"true\"<\/span>\n            android:label=<span class=\"hljs-string\">\"@string\/wallpaper_name\"<\/span> \/\/\u4e0b\u9762\u7b2c\u4e00\u5f20\u56fe\u7247\u4e2dlabel\n            android:permission=<span class=\"hljs-string\">\"android.permission.BIND_WALLPAPER\"<\/span>&gt;\/\/\u52a8\u6001\u58c1\u7eb8\u5fc5\u987b\u52a0\u6b64\u6743\u9650\n\n            &lt;intent-filter&gt;\n                \/\/\u7cfb\u7edf\u5c31\u662f\u901a\u8fc7APK\u7684\u8fd9\u4e2aaction\u628a\u5176\u5f53\u505a\u4e00\u4e2a\u52a8\u6001\u5899\u7eb8\u3002\n              &lt;action android:name=<span class=\"hljs-string\">\"android.service.wallpaper.WallpaperService\"<\/span>&gt;&lt;\/action&gt;\n            &lt;\/intent-filter&gt;\n\n            &lt;!-- android:resource \u6307\u5b9a\u7684xml\u5f88\u91cd\u8981\uff01\uff01\uff01\u540e\u9762\u4f1a\u5355\u72ec\u4ecb\u7ecd --&gt;\n            &lt;meta-data\n                android:name=<span class=\"hljs-string\">\"android.service.wallpaper\"<\/span>\n                android:resource=<span class=\"hljs-string\">\"@xml\/clock_wallpaper\"<\/span>&gt;\n            &lt;\/meta-data&gt;\n\n        &lt;\/service&gt;\n    &lt;\/application&gt;\n\n&lt;\/manifest&gt;<\/code><\/pre>\n<hr\/>\n<h3 id=\"clockwallpaperxml\">\n   clock_wallpaper.xml<br \/>\n  <\/h3>\n<pre class=\"prettyprint\"><code class=\"language-python hljs\">&lt;?xml version=<span class=\"hljs-string\">\"1.0\"<\/span> encoding=<span class=\"hljs-string\">\"UTF-8\"<\/span>?&gt;\n&lt;wallpaper xmlns:android=<span class=\"hljs-string\">\"http:\/\/schemas.android.com\/apk\/res\/android\"<\/span>\n    android:description=<span class=\"hljs-string\">\"@string\/wallpaper_description\"<\/span>\n    android:settingsActivity=<span class=\"hljs-string\">\"com.qwq.clocklivewallpaper.SettingsActivity\"<\/span>\n    android:thumbnail=<span class=\"hljs-string\">\"@drawable\/ic_preview\"<\/span> \/&gt;<\/code><\/pre>\n<hr\/>\n<p>\n   android:thumbnail \u52a8\u6001\u58c1\u7eb8\u5217\u8868\u4e2d\u7684\u56fe\u6807\uff0c<br \/>\n   <br \/>\n   android:description \u52a8\u6001\u58c1\u7eb8\u7684\u7b80\u5355\u4ecb\u7ecd\u6587\u5b57\uff0c\u6709\u7684\u624b\u673a\u53ef\u80fd\u4e0d\u663e\u793a<br \/>\n   \n  <\/p>\n<p>\n   android:settingsActivity \u6307\u5b9a\u4e00\u4e2aActivity\u3002\u7cfb\u7edf\u4f1a\u68c0\u6d4b\u52a8\u6001\u58c1\u7eb8\u5e94\u7528\u6709\u6ca1\u6709\u6b64\u5c5e\u6027\u3002\u5982\u679c\u6709\u5219\u548c\u4e0b\u65b9\u7684\u56fe\u7247\u663e\u793a\u6548\u679c\u4e00\u6837\uff08\u4e24\u4e2aButton\uff09\uff0c\u70b9\u51fb\u4e0b\u56fe\u4e2d\u8bbe\u5b9aButton\u53ef\u8df3\u8f6c\u81f3\u6307\u5b9a\u7684Activity\uff08\u8bbe\u7f6e\u754c\u9762\uff09\u3002\u5982\u679c\u6ca1\u6709\u6b64\u5c5e\u6027\uff0c\u5c31\u53ea\u6709\u4e00\u4e2a\u8bbe\u7f6e\u58c1\u7eb8Button\u3002\u53ef\u4ee5\u53bb\u6389\u6b64\u5c5e\u6027\u770b\u4e00\u4e0b\u6548\u679c\u3002<br \/>\n   \n  <\/p>\n<hr\/>\n<h3 id=\"wallpaperservice\u6838\u5fc3\">\n   WallpaperService\uff08\u6838\u5fc3\uff09<br \/>\n  <\/h3>\n<p>\n   \u5b9e\u73b0\u52a8\u6001\u58c1\u7eb8\u5fc5\u987b\u7ee7\u627fWallpaperService\uff0c\u4e14\u91cd\u8f7donCreateEngine\u65b9\u6cd5\u3002onCreateEngine()\u65b9\u6cd5\u53ea\u9700\u8fd4\u56de\u4e00\u4e2aEngine\u7684\u5b50\u7c7b\u5bf9\u8c61\u5c31\u53ef\u4ee5\u4e86\uff0c\u6240\u4ee5\u52a8\u6001\u58c1\u7eb8\u5e94\u7528\u7684\u4e3b\u8981\u5de5\u4f5c\u5c31\u662f\u5b9e\u73b0Engine\u7684\u5b50\u7c7b\u3002\u5176\u539f\u7406\u662f\u4f7f\u7528surfaceview\u4e0d\u65ad\u66f4\u65b0,\u5b9e\u73b0\u52a8\u6001\u58c1\u7eb8\u6548\u679c\u3002\u4e0d\u591a\u8bf4\u4e86\uff0c\u76f4\u63a5\u8d34\u4ee3\u7801\uff0c\u91cd\u8981\u7684\u65b9\u6cd5\u90fd\u4f1a\u6709\u6240\u8bf4\u660e\u3002\n  <\/p>\n<pre class=\"prettyprint\"><code class=\"language-python hljs\">package com.qwq.clocklivewallpaper;\n\n<span class=\"hljs-keyword\">import<\/span> android.content.SharedPreferences;\n<span class=\"hljs-keyword\">import<\/span> android.content.SharedPreferences.OnSharedPreferenceChangeListener;\n<span class=\"hljs-keyword\">import<\/span> android.graphics.Canvas;\n<span class=\"hljs-keyword\">import<\/span> android.graphics.Color;\n<span class=\"hljs-keyword\">import<\/span> android.graphics.Paint;\n<span class=\"hljs-keyword\">import<\/span> android.os.Handler;\n<span class=\"hljs-keyword\">import<\/span> android.preference.PreferenceManager;\n<span class=\"hljs-keyword\">import<\/span> android.service.wallpaper.WallpaperService;\n<span class=\"hljs-keyword\">import<\/span> android.util.Log;\n<span class=\"hljs-keyword\">import<\/span> android.view.MotionEvent;\n<span class=\"hljs-keyword\">import<\/span> android.view.SurfaceHolder;\n\n<span class=\"hljs-keyword\">import<\/span> java.util.Date;\n\npublic <span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">ClockWallpaperService<\/span> <span class=\"hljs-title\">extends<\/span> <span class=\"hljs-title\">WallpaperService<\/span> {\n\n    <span class=\"hljs-title\">static<\/span> <span class=\"hljs-title\">final<\/span> <span class=\"hljs-title\">String<\/span> <span class=\"hljs-title\">TAG<\/span> = <span class=\"hljs-title\">ClockWallpaperService<\/span>.<span class=\"hljs-title\">class<\/span>.<span class=\"hljs-title\">getSimpleName<\/span><span class=\"hljs-params\">()<\/span>;\n    <span class=\"hljs-title\">static<\/span> <span class=\"hljs-title\">final<\/span> <span class=\"hljs-title\">int<\/span> <span class=\"hljs-title\">POINTER_WIDTH<\/span> = 9;\n\n  \/\/  <span class=\"hljs-title\">onCreateEngine<\/span><span class=\"hljs-params\">()<\/span>\u65b9\u6cd5\u9700\u8fd4\u56de\u4e00\u4e2a<span class=\"hljs-title\">Engine<\/span>\u7684\u5b50\u7c7b\u5bf9\u8c61\u5c31\u53ef\u4ee5\u4e86\uff0c\n  \/\/  \u6240\u4ee5\u52a8\u6001\u58c1\u7eb8\u5e94\u7528\u7684\u4e3b\u8981\u5de5\u4f5c\u5c31\u662f\u5b9e\u73b0<span class=\"hljs-title\">Engine<\/span>\u7684\u5b50\u7c7b\n  @<span class=\"hljs-title\">Override<\/span>\n  <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">Engine<\/span> <span class=\"hljs-title\">onCreateEngine<\/span><span class=\"hljs-params\">()<\/span> {\n        <span class=\"hljs-title\">Log<\/span>.<span class=\"hljs-title\">d<\/span><span class=\"hljs-params\">(TAG, <span class=\"hljs-string\">\"onCreateEngine\"<\/span>)<\/span>;\n        <span class=\"hljs-title\">return<\/span> <span class=\"hljs-title\">new<\/span> <span class=\"hljs-title\">ClockWallpaperEngine<\/span><span class=\"hljs-params\">()<\/span>;\n    }\n\n\n    \/\/\u5b9e\u73b0<span class=\"hljs-title\">Engine<\/span>\u7684\u5b50\u7c7b\uff0c\u672c\u6587\u7684\u91cd\u4e2d\u4e4b\u91cd\uff0c\u52a8\u6001\u58c1\u7eb8\u5c31\u662f\u5728\u6b64\u5177\u4f53\u5b9e\u73b0\u7684\n  <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">class<\/span> <span class=\"hljs-title\">ClockWallpaperEngine<\/span> <span class=\"hljs-title\">extends<\/span> <span class=\"hljs-title\">Engine<\/span> <span class=\"hljs-title\">implements<\/span> \n  <span class=\"hljs-title\">OnSharedPreferenceChangeListener<\/span> {\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">final<\/span> <span class=\"hljs-title\">Handler<\/span> <span class=\"hljs-title\">handler<\/span> = <span class=\"hljs-title\">new<\/span> <span class=\"hljs-title\">Handler<\/span><span class=\"hljs-params\">()<\/span>;\n        \/\/ <span class=\"hljs-title\">surfacewive<\/span>\u4f7f\u7528\u7ebf\u7a0b\u66f4\u65b0<span class=\"hljs-title\">UI<\/span>\uff0c\u6240\u4ee5\u6211\u4eec\u53ef\u4f7f\u7528<span class=\"hljs-title\">Runnable<\/span>\u63a5\u53e3\u521b\u5efa\u4e00\u4e2a\u7ebf\u7a0b\uff0c\u628a\u5177\u4f53\u7ed8\u5236\u65b9\u6cd5\u653e\u8fdb\u53bb\uff0c\n        \/\/ \u4e0b\u6587\u4f1a\u4f7f\u7528<span class=\"hljs-title\">handler<\/span>\u8c03\u7528\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">final<\/span> <span class=\"hljs-title\">Runnable<\/span> <span class=\"hljs-title\">drawRunner<\/span> = <span class=\"hljs-title\">new<\/span> <span class=\"hljs-title\">Runnable<\/span><span class=\"hljs-params\">()<\/span> {\n            @<span class=\"hljs-title\">Override<\/span>\n            <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">run<\/span><span class=\"hljs-params\">()<\/span> {\n                <span class=\"hljs-title\">draw<\/span><span class=\"hljs-params\">()<\/span>;\n            }\n        };\n\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">Paint<\/span> <span class=\"hljs-title\">paint<\/span>;\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">int<\/span> <span class=\"hljs-title\">width<\/span>;\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">int<\/span> <span class=\"hljs-title\">height<\/span>;\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">boolean<\/span> <span class=\"hljs-title\">isVisible<\/span> = <span class=\"hljs-title\">true<\/span>;\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">boolean<\/span> <span class=\"hljs-title\">isShowSecond<\/span>;\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">ClockView<\/span> <span class=\"hljs-title\">clockView<\/span>;\n        <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">SharedPreferences<\/span> <span class=\"hljs-title\">sp<\/span>;\n\n \/\/\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316\u52a8\u6001\u58c1\u7eb8\n <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">ClockWallpaperEngine<\/span><span class=\"hljs-params\">()<\/span> {\n            <span class=\"hljs-title\">Log<\/span>.<span class=\"hljs-title\">d<\/span><span class=\"hljs-params\">(TAG, <span class=\"hljs-string\">\"ClockWallpaperEngine\"<\/span>)<\/span>;\n            <span class=\"hljs-title\">initSp<\/span><span class=\"hljs-params\">()<\/span>;\n            <span class=\"hljs-title\">initPaint<\/span><span class=\"hljs-params\">()<\/span>;\n            <span class=\"hljs-title\">startDrawClock<\/span><span class=\"hljs-params\">()<\/span>;\n        }\n\n  <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">initSp<\/span><span class=\"hljs-params\">()<\/span> {\n         <span class=\"hljs-title\">sp<\/span> = <span class=\"hljs-title\">PreferenceManager<\/span>.<span class=\"hljs-title\">getDefaultSharedPreferences<\/span><span class=\"hljs-params\">(ClockWallpaperService.this)<\/span>;\n         <span class=\"hljs-title\">sp<\/span>.<span class=\"hljs-title\">registerOnSharedPreferenceChangeListener<\/span><span class=\"hljs-params\">(this)<\/span>;\n         <span class=\"hljs-title\">isShowSecond<\/span> = <span class=\"hljs-title\">sp<\/span>.<span class=\"hljs-title\">getBoolean<\/span><span class=\"hljs-params\">(SettingsActivity.IS_SHOW_SECOND, true)<\/span>;\n        }\n\n  <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">initPaint<\/span><span class=\"hljs-params\">()<\/span> {\n            <span class=\"hljs-title\">paint<\/span> = <span class=\"hljs-title\">new<\/span> <span class=\"hljs-title\">Paint<\/span><span class=\"hljs-params\">()<\/span>;\n            <span class=\"hljs-title\">paint<\/span>.<span class=\"hljs-title\">setAntiAlias<\/span><span class=\"hljs-params\">(true)<\/span>;\n            <span class=\"hljs-title\">paint<\/span>.<span class=\"hljs-title\">setStyle<\/span><span class=\"hljs-params\">(Paint.Style.STROKE)<\/span>;\n            <span class=\"hljs-title\">paint<\/span>.<span class=\"hljs-title\">setStrokeWidth<\/span><span class=\"hljs-params\">(POINTER_WIDTH)<\/span>;\n        }\n\n   <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">startDrawClock<\/span><span class=\"hljs-params\">()<\/span> {\n            <span class=\"hljs-title\">clockView<\/span> = <span class=\"hljs-title\">new<\/span> <span class=\"hljs-title\">ClockView<\/span><span class=\"hljs-params\">(getApplicationContext<span class=\"hljs-params\">()<\/span>)<\/span>;\n            <span class=\"hljs-title\">handler<\/span>.<span class=\"hljs-title\">post<\/span><span class=\"hljs-params\">(drawRunner)<\/span>;\n        }\n\n   @<span class=\"hljs-title\">Override<\/span>\n   <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">onCreate<\/span><span class=\"hljs-params\">(SurfaceHolder surfaceHolder)<\/span> {\n            <span class=\"hljs-title\">super<\/span>.<span class=\"hljs-title\">onCreate<\/span><span class=\"hljs-params\">(surfaceHolder)<\/span>;\n            <span class=\"hljs-title\">Log<\/span>.<span class=\"hljs-title\">d<\/span><span class=\"hljs-params\">(TAG, <span class=\"hljs-string\">\"onCreate\"<\/span>)<\/span>;\n        }\n\n\n   \/\/\u76d1\u542c\u662f\u5426\u53ef\u89c1\u53d8\u5316\uff0c\u53ef\u89c1\u65f6\u5f00\u59cb\u66f4\u65b0<span class=\"hljs-title\">UI<\/span>,\u4e0d\u53ef\u89c1\u65f6\u505c\u6b62\u5237\u65b0\n   @<span class=\"hljs-title\">Override<\/span>\n   <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">onVisibilityChanged<\/span><span class=\"hljs-params\">(boolean visible)<\/span> {\n            <span class=\"hljs-title\">this<\/span>.<span class=\"hljs-title\">isVisible<\/span> = <span class=\"hljs-title\">visible<\/span>;\n            <span class=\"hljs-title\">if<\/span> <span class=\"hljs-params\">(visible)<\/span> {\n                <span class=\"hljs-title\">handler<\/span>.<span class=\"hljs-title\">post<\/span><span class=\"hljs-params\">(drawRunner)<\/span>;\n            } <span class=\"hljs-title\">else<\/span> {\n                <span class=\"hljs-title\">handler<\/span>.<span class=\"hljs-title\">removeCallbacks<\/span><span class=\"hljs-params\">(drawRunner)<\/span>;\n            }\n        }\n\n   @<span class=\"hljs-title\">Override<\/span>\n   <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">onSurfaceDestroyed<\/span><span class=\"hljs-params\">(SurfaceHolder holder)<\/span> {\n            <span class=\"hljs-title\">super<\/span>.<span class=\"hljs-title\">onSurfaceDestroyed<\/span><span class=\"hljs-params\">(holder)<\/span>;\n            <span class=\"hljs-title\">isVisible<\/span> = <span class=\"hljs-title\">false<\/span>;\n            <span class=\"hljs-title\">handler<\/span>.<span class=\"hljs-title\">removeCallbacks<\/span><span class=\"hljs-params\">(drawRunner)<\/span>;\n            <span class=\"hljs-title\">sp<\/span>.<span class=\"hljs-title\">unregisterOnSharedPreferenceChangeListener<\/span><span class=\"hljs-params\">(this)<\/span>;\n        }\n\n\n   @<span class=\"hljs-title\">Override<\/span>\n   <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">onSurfaceChanged<\/span><span class=\"hljs-params\">(SurfaceHolder holder,int format,int width,int height)<\/span>{    \n            <span class=\"hljs-title\">this<\/span>.<span class=\"hljs-title\">width<\/span> = <span class=\"hljs-title\">width<\/span>;\n            <span class=\"hljs-title\">this<\/span>.<span class=\"hljs-title\">height<\/span> = <span class=\"hljs-title\">height<\/span>;\n            <span class=\"hljs-title\">super<\/span>.<span class=\"hljs-title\">onSurfaceChanged<\/span><span class=\"hljs-params\">(holder, format, width, height)<\/span>;\n        }\n\n   \/\/\u7ed8\u5236\uff0c\u6bcf\u4e2a200\u6beb\u79d2\u5237\u65b0\u754c\u9762\n   <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">draw<\/span><span class=\"hljs-params\">()<\/span> {\n            <span class=\"hljs-title\">SurfaceHolder<\/span> <span class=\"hljs-title\">holder<\/span> = <span class=\"hljs-title\">getSurfaceHolder<\/span><span class=\"hljs-params\">()<\/span>;\n            <span class=\"hljs-title\">Canvas<\/span> <span class=\"hljs-title\">canvas<\/span> = <span class=\"hljs-title\">null<\/span>;\n            <span class=\"hljs-title\">try<\/span> {\n                <span class=\"hljs-title\">canvas<\/span> = <span class=\"hljs-title\">holder<\/span>.<span class=\"hljs-title\">lockCanvas<\/span><span class=\"hljs-params\">()<\/span>;\n                <span class=\"hljs-title\">if<\/span> <span class=\"hljs-params\">(canvas != null)<\/span> {\n                    <span class=\"hljs-title\">drawClock<\/span><span class=\"hljs-params\">(canvas)<\/span>;\n                }\n            } <span class=\"hljs-title\">finally<\/span> {\n                <span class=\"hljs-title\">if<\/span> <span class=\"hljs-params\">(canvas != null)<\/span> {\n                    <span class=\"hljs-title\">holder<\/span>.<span class=\"hljs-title\">unlockCanvasAndPost<\/span><span class=\"hljs-params\">(canvas)<\/span>;\n                }\n            }\n\n            <span class=\"hljs-title\">handler<\/span>.<span class=\"hljs-title\">removeCallbacks<\/span><span class=\"hljs-params\">(drawRunner)<\/span>;\n            <span class=\"hljs-title\">if<\/span> <span class=\"hljs-params\">(isVisible)<\/span> {\n                <span class=\"hljs-title\">handler<\/span>.<span class=\"hljs-title\">postDelayed<\/span><span class=\"hljs-params\">(drawRunner, <span class=\"hljs-number\">200<\/span>)<\/span>;\n            }\n        }\n\n  \/\/\u5177\u4f53\u7ed8\u5236\u949f\u8868\n  <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">drawClock<\/span><span class=\"hljs-params\">(Canvas canvas)<\/span> {\n       <span class=\"hljs-title\">canvas<\/span>.<span class=\"hljs-title\">drawColor<\/span><span class=\"hljs-params\">(Color.WHITE)<\/span>;   \/\/\u7ed8\u5236\u6574\u4e2a\u52a8\u6001\u58c1\u7eb8\u7684\u80cc\u666f\u989c\u8272\n       <span class=\"hljs-title\">clockView<\/span>.<span class=\"hljs-title\">config<\/span><span class=\"hljs-params\">(width \/ <span class=\"hljs-number\">2<\/span>, height \/ <span class=\"hljs-number\">2<\/span>, <span class=\"hljs-params\">(int)<\/span> <span class=\"hljs-params\">(width * <span class=\"hljs-number\">0.8<\/span>f)<\/span>, new Date<span class=\"hljs-params\">()<\/span>, \n       paint, isShowSecond)<\/span>;\n       <span class=\"hljs-title\">clockView<\/span>.<span class=\"hljs-title\">draw<\/span><span class=\"hljs-params\">(canvas)<\/span>;\n        }\n\n  @<span class=\"hljs-title\">Override<\/span>\n  <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">onSharedPreferenceChanged<\/span><span class=\"hljs-params\">(SharedPreferences sharedPreferences, String \n  key)<\/span>{ \n     \/\/\u76d1\u542c<span class=\"hljs-title\">SharedPreference<\/span>\u53d8\u5316\uff0c\u6539\u53d8\u52a8\u6001\u58c1\u7eb8\u6837\u5f0f\n     <span class=\"hljs-title\">if<\/span> <span class=\"hljs-params\">(SettingsActivity.IS_SHOW_SECOND.equals<span class=\"hljs-params\">(key)<\/span>)<\/span> {\n     <span class=\"hljs-title\">isShowSecond<\/span> = <span class=\"hljs-title\">sharedPreferences<\/span>.<span class=\"hljs-title\">getBoolean<\/span><span class=\"hljs-params\">(SettingsActivity.IS_SHOW_SECOND,  \n     true)<\/span>;\n            }\n        }\n\n   @<span class=\"hljs-title\">Override<\/span>\n   <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">onTouchEvent<\/span><span class=\"hljs-params\">(MotionEvent event)<\/span> {\n            <span class=\"hljs-title\">super<\/span>.<span class=\"hljs-title\">onTouchEvent<\/span><span class=\"hljs-params\">(event)<\/span>;\n            \/\/ \u53ef\u4ee5\u5728\u8fd9\u91cc\u505a\u4e00\u4e9b\u4e0e\u7528\u6237\u4ea4\u4e92\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u52a8\u6001\u661f\u661f\u58c1\u7eb8\uff0c\u7528\u6237\u89e6\u6478\u5c4f\u5e55\u65f6\u589e\u52a0\u661f\u661f\u6570\u91cf\u3002\n            <span class=\"hljs-title\">Log<\/span>.<span class=\"hljs-title\">d<\/span><span class=\"hljs-params\">(TAG, <span class=\"hljs-string\">\"onTouchEvent\"<\/span>)<\/span>;\n        }\n    }\n\n}\n\n<\/span><\/code><\/pre>\n<hr\/>\n<h3 id=\"clockview\u949f\u8868\u7684\u5177\u4f53\u7ed8\u5236\">\n   ClockView\uff08\u949f\u8868\u7684\u5177\u4f53\u7ed8\u5236\uff09<br \/>\n  <\/h3>\n<pre class=\"prettyprint\"><code class=\"language-python hljs\">package com.qwq.clocklivewallpaper;\n\n<span class=\"hljs-keyword\">import<\/span> android.content.Context;\n<span class=\"hljs-keyword\">import<\/span> android.graphics.Bitmap;\n<span class=\"hljs-keyword\">import<\/span> android.graphics.BitmapFactory;\n<span class=\"hljs-keyword\">import<\/span> android.graphics.Canvas;\n<span class=\"hljs-keyword\">import<\/span> android.graphics.Color;\n<span class=\"hljs-keyword\">import<\/span> android.graphics.Paint;\n<span class=\"hljs-keyword\">import<\/span> android.util.Log;\n<span class=\"hljs-keyword\">import<\/span> android.view.View;\n\n<span class=\"hljs-keyword\">import<\/span> java.util.Calendar;\n<span class=\"hljs-keyword\">import<\/span> java.util.Date;\n\npublic <span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">ClockView<\/span> <span class=\"hljs-title\">extends<\/span> <span class=\"hljs-title\">View<\/span> {\n\n    <span class=\"hljs-title\">static<\/span> <span class=\"hljs-title\">final<\/span> <span class=\"hljs-title\">String<\/span> <span class=\"hljs-title\">TAG<\/span> = <span class=\"hljs-title\">ClockView<\/span>.<span class=\"hljs-title\">class<\/span>.<span class=\"hljs-title\">getSimpleName<\/span><span class=\"hljs-params\">()<\/span>;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">float<\/span> <span class=\"hljs-title\">x<\/span>;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">float<\/span> <span class=\"hljs-title\">y<\/span>;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">int<\/span> <span class=\"hljs-title\">radius<\/span>;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">Calendar<\/span> <span class=\"hljs-title\">cal<\/span>;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">Paint<\/span> <span class=\"hljs-title\">paint<\/span>;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">Bitmap<\/span> <span class=\"hljs-title\">clockDial<\/span> = <span class=\"hljs-title\">BitmapFactory<\/span>.<span class=\"hljs-title\">decodeResource<\/span><span class=\"hljs-params\">(getResources<span class=\"hljs-params\">()<\/span>,R.drawable.clock_bg)<\/span>;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">int<\/span> <span class=\"hljs-title\">sizeScaled<\/span> = -1;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">Bitmap<\/span> <span class=\"hljs-title\">clockDialScaled<\/span>;\n    <span class=\"hljs-title\">private<\/span> <span class=\"hljs-title\">boolean<\/span> <span class=\"hljs-title\">isShowSecond<\/span>;\n\n    <span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">ClockView<\/span><span class=\"hljs-params\">(Context context)<\/span> {\n        <span class=\"hljs-title\">super<\/span><span class=\"hljs-params\">(context)<\/span>;\n        <span class=\"hljs-title\">cal<\/span> = <span class=\"hljs-title\">Calendar<\/span>.<span class=\"hljs-title\">getInstance<\/span><span class=\"hljs-params\">()<\/span>;\n    }\n\n\/\/\u8bbe\u7f6e\u949f\u8868\u5bbd\u9ad8\u7b49\u5c5e\u6027\n<span class=\"hljs-title\">public<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">config<\/span><span class=\"hljs-params\">(float x, float y, int size, Date date, Paint paint, boolean \n    isShowSecond)<\/span> {\n        <span class=\"hljs-title\">this<\/span>.<span class=\"hljs-title\">x<\/span> = <span class=\"hljs-title\">x<\/span>;\n        <span class=\"hljs-title\">this<\/span>.<span class=\"hljs-title\">y<\/span> = <span class=\"hljs-title\">y<\/span>;\n        <span class=\"hljs-title\">this<\/span>.<span class=\"hljs-title\">paint<\/span> = <span class=\"hljs-title\">paint<\/span>;\n        <span class=\"hljs-title\">this<\/span>.<span class=\"hljs-title\">isShowSecond<\/span> = <span class=\"hljs-title\">isShowSecond<\/span>;\n\n        <span class=\"hljs-title\">cal<\/span>.<span class=\"hljs-title\">setTime<\/span><span class=\"hljs-params\">(date)<\/span>;\n\n        <span class=\"hljs-title\">if<\/span> <span class=\"hljs-params\">(size != sizeScaled)<\/span> {\n            <span class=\"hljs-title\">clockDialScaled<\/span> = <span class=\"hljs-title\">Bitmap<\/span>.<span class=\"hljs-title\">createScaledBitmap<\/span><span class=\"hljs-params\">(clockDial, size, size, false)<\/span>;\n            <span class=\"hljs-title\">radius<\/span> = <span class=\"hljs-title\">size<\/span> \/ 2;\n        }\n    }\n\n\/\/\u5177\u4f53\u7ed8\u5236\u949f\u8868\u7684\u6307\u9488\n<span class=\"hljs-title\">protected<\/span> <span class=\"hljs-title\">void<\/span> <span class=\"hljs-title\">onDraw<\/span><span class=\"hljs-params\">(Canvas canvas)<\/span> {\n   <span class=\"hljs-title\">Log<\/span>.<span class=\"hljs-title\">d<\/span><span class=\"hljs-params\">(TAG,<span class=\"hljs-string\">\"onDraw:\"<\/span>+canvas)<\/span>;\n   <span class=\"hljs-title\">super<\/span>.<span class=\"hljs-title\">onDraw<\/span><span class=\"hljs-params\">(canvas)<\/span>;\n   <span class=\"hljs-title\">if<\/span> <span class=\"hljs-params\">(paint != null)<\/span> {\n            <span class=\"hljs-title\">canvas<\/span>.<span class=\"hljs-title\">drawBitmap<\/span><span class=\"hljs-params\">(clockDialScaled, x - radius, y - radius, null)<\/span>;\n\n            <span class=\"hljs-title\">float<\/span> <span class=\"hljs-title\">sec<\/span> = <span class=\"hljs-title\">cal<\/span>.<span class=\"hljs-title\">get<\/span><span class=\"hljs-params\">(Calendar.SECOND)<\/span>;\n            <span class=\"hljs-title\">float<\/span> <span class=\"hljs-title\">min<\/span> = <span class=\"hljs-title\">cal<\/span>.<span class=\"hljs-title\">get<\/span><span class=\"hljs-params\">(Calendar.MINUTE)<\/span>;\n            <span class=\"hljs-title\">float<\/span> <span class=\"hljs-title\">hour<\/span> = <span class=\"hljs-title\">cal<\/span>.<span class=\"hljs-title\">get<\/span><span class=\"hljs-params\">(Calendar.HOUR_OF_DAY)<\/span>;\n\n\n   <span class=\"hljs-title\">paint<\/span>.<span class=\"hljs-title\">setColor<\/span><span class=\"hljs-params\">(Color.RED)<\/span>;\n   <span class=\"hljs-title\">canvas<\/span>.<span class=\"hljs-title\">drawLine<\/span><span class=\"hljs-params\">(x, y,\n   <span class=\"hljs-params\">(float)<\/span><span class=\"hljs-params\">(x + <span class=\"hljs-params\">(radius * <span class=\"hljs-number\">0.5<\/span>f)<\/span>*Math.cos<span class=\"hljs-params\">(Math.toRadians<span class=\"hljs-params\">(<span class=\"hljs-params\">(hour \/ <span class=\"hljs-number\">12.0<\/span>f * <span class=\"hljs-number\">360.0<\/span>f)<\/span> - <span class=\"hljs-number\">90<\/span>f)<\/span>)<\/span>)<\/span>,\n   <span class=\"hljs-params\">(float)<\/span><span class=\"hljs-params\">(y + <span class=\"hljs-params\">(radius * <span class=\"hljs-number\">0.5<\/span>f)<\/span>*Math.sin<span class=\"hljs-params\">(Math.toRadians<span class=\"hljs-params\">(<span class=\"hljs-params\">(hour \/ <span class=\"hljs-number\">12.0<\/span>f * <span class=\"hljs-number\">360.0<\/span>f)<\/span> -<span class=\"hljs-number\">90<\/span>f)<\/span>)<\/span>)<\/span>,   \n   paint)<\/span>;\n   <span class=\"hljs-title\">canvas<\/span>.<span class=\"hljs-title\">save<\/span><span class=\"hljs-params\">()<\/span>;\n\n    <span class=\"hljs-title\">paint<\/span>.<span class=\"hljs-title\">setColor<\/span><span class=\"hljs-params\">(Color.BLUE)<\/span>;\n    <span class=\"hljs-title\">canvas<\/span>.<span class=\"hljs-title\">drawLine<\/span><span class=\"hljs-params\">(x, y, \n    <span class=\"hljs-params\">(float)<\/span><span class=\"hljs-params\">(x + <span class=\"hljs-params\">(radius * <span class=\"hljs-number\">0.6<\/span>f)<\/span>*Math.cos<span class=\"hljs-params\">(Math.toRadians<span class=\"hljs-params\">(<span class=\"hljs-params\">(min \/ <span class=\"hljs-number\">60.0<\/span>f * <span class=\"hljs-number\">360.0<\/span>f)<\/span> - <span class=\"hljs-number\">90<\/span>f)<\/span>)<\/span>)<\/span>,\n    <span class=\"hljs-params\">(float)<\/span><span class=\"hljs-params\">(y + <span class=\"hljs-params\">(radius * <span class=\"hljs-number\">0.6<\/span>f)<\/span>*Math.sin<span class=\"hljs-params\">(Math.toRadians<span class=\"hljs-params\">(<span class=\"hljs-params\">(min \/ <span class=\"hljs-number\">60.0<\/span>f * <span class=\"hljs-number\">360.0<\/span>f)<\/span> - <span class=\"hljs-number\">90<\/span>f)<\/span>)<\/span>)<\/span>,  \n    paint)<\/span>;\n    <span class=\"hljs-title\">canvas<\/span>.<span class=\"hljs-title\">save<\/span><span class=\"hljs-params\">()<\/span>;\n\n    <span class=\"hljs-title\">if<\/span> <span class=\"hljs-params\">(isShowSecond)<\/span> {\n       <span class=\"hljs-title\">paint<\/span>.<span class=\"hljs-title\">setColor<\/span><span class=\"hljs-params\">(Color.GREEN)<\/span>;\n       <span class=\"hljs-title\">canvas<\/span>.<span class=\"hljs-title\">drawLine<\/span><span class=\"hljs-params\">(x, y,\n       <span class=\"hljs-params\">(float)<\/span><span class=\"hljs-params\">(x + <span class=\"hljs-params\">(radius * <span class=\"hljs-number\">0.7<\/span>f)<\/span>*Math.cos<span class=\"hljs-params\">(Math.toRadians<span class=\"hljs-params\">(<span class=\"hljs-params\">(sec\/<span class=\"hljs-number\">60.0<\/span>f * <span class=\"hljs-number\">360.0<\/span>f)<\/span> - <span class=\"hljs-number\">90<\/span>f)<\/span>)<\/span>)<\/span>,\n       <span class=\"hljs-params\">(float)<\/span><span class=\"hljs-params\">(y + <span class=\"hljs-params\">(radius * <span class=\"hljs-number\">0.7<\/span>f)<\/span>*Math.sin<span class=\"hljs-params\">(Math.toRadians<span class=\"hljs-params\">(<span class=\"hljs-params\">(sec\/<span class=\"hljs-number\">60.0<\/span>f * <span class=\"hljs-number\">360.0<\/span>f)<\/span> - <span class=\"hljs-number\">90<\/span>f)<\/span>)<\/span>)<\/span>,   \n       paint)<\/span>;\n          }\n        }\n    }\n\n}<\/span><\/code><\/pre>\n<hr\/><\/div>\n<link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/markdown_views-a5d25dd831.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/style-e504d6a974.css\" rel=\"stylesheet\"\/>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u52a8\u6001\u58c1\u7eb8 Livewallpaper\uff08\u52a8\u6001\u58c1\u7eb8\uff09\uff1a \u9996\u5148\u52a8\u6001\u58c1\u7eb8\u5e76\u4e0d\u662fGIF\u56fe\u7247\uff0c\u800c\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u5e94\u7528\u7a0b\u5e8f,\u672c\u8d28 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1468","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u52a8\u6001\u58c1\u7eb8 Livewallpaper\uff08\u52a8\u6001\u58c1\u7eb8\uff09\uff1a \u9996\u5148\u52a8\u6001\u58c1\u7eb8\u5e76\u4e0d\u662fGIF\u56fe\u7247\uff0c\u800c\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u5e94\u7528\u7a0b\u5e8f,\u672c\u8d28 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-28T16:00:12+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"260\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@wunen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@wunen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3\",\"datePublished\":\"2025-04-28T16:00:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/\"},\"wordCount\":28,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"articleSection\":[\"\u52a8\u6001\u58c1\u7eb8\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/\",\"url\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/\",\"name\":\"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-04-28T16:00:12+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#primaryimage\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"width\":260,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wunen.com\/#website\",\"url\":\"https:\/\/www.wunen.com\/\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"description\":\"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9\",\"publisher\":{\"@id\":\"https:\/\/www.wunen.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wunen.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.wunen.com\/#organization\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"url\":\"https:\/\/www.wunen.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"width\":1024,\"height\":1024,\"caption\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\",\"name\":\"admin@wunen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"caption\":\"admin@wunen\"},\"sameAs\":[\"http:\/\/www.wunen.com\"],\"url\":\"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3\/","og_locale":"zh_CN","og_type":"article","og_title":"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u52a8\u6001\u58c1\u7eb8 Livewallpaper\uff08\u52a8\u6001\u58c1\u7eb8\uff09\uff1a \u9996\u5148\u52a8\u6001\u58c1\u7eb8\u5e76\u4e0d\u662fGIF\u56fe\u7247\uff0c\u800c\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u5e94\u7528\u7a0b\u5e8f,\u672c\u8d28 [&hellip;]","og_url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-04-28T16:00:12+00:00","og_image":[{"width":260,"height":180,"url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","type":"image\/jpeg"}],"author":"admin@wunen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin@wunen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#article","isPartOf":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/"},"author":{"name":"admin@wunen","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3","datePublished":"2025-04-28T16:00:12+00:00","mainEntityOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/"},"wordCount":28,"commentCount":0,"publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","articleSection":["\u52a8\u6001\u58c1\u7eb8"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/","url":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/","name":"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3 - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"https:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#primaryimage"},"image":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-04-28T16:00:12+00:00","breadcrumb":{"@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#primaryimage","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","width":260,"height":180},{"@type":"BreadcrumbList","@id":"http:\/\/www.wunen.com\/index.php\/2025\/04\/29\/android%e5%8a%a8%e6%80%81%e5%a3%81%e7%ba%b8%e8%af%a6%e8%a7%a3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"Android\u52a8\u6001\u58c1\u7eb8\u8be6\u89e3"}]},{"@type":"WebSite","@id":"https:\/\/www.wunen.com\/#website","url":"https:\/\/www.wunen.com\/","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","description":"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9","publisher":{"@id":"https:\/\/www.wunen.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wunen.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.wunen.com\/#organization","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","url":"https:\/\/www.wunen.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","width":1024,"height":1024,"caption":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51"},"image":{"@id":"https:\/\/www.wunen.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8","name":"admin@wunen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","caption":"admin@wunen"},"sameAs":["http:\/\/www.wunen.com"],"url":"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/"}]}},"_links":{"self":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/1468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/comments?post=1468"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/1468\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media\/215"}],"wp:attachment":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media?parent=1468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=1468"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=1468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}