blob: 35da2ab28061496af4d5255cb770cb8faef61152 [file] [log] [blame]
<html devsite><head>
<title>实现圆形图标</title>
<meta name="project_path" value="/_project.yaml"/>
<meta name="book_path" value="/_book.yaml"/>
</head>
<body>
<!--
Copyright 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<p>Android 7.1.1 及更高版本支持使用圆形<a href="https://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html">启动器图标</a>。默认情况下,系统不会启用圆形启动器图标。要在设备实现中使用圆形图标,您必须修改设备上的<a href="/source/add-device.html#use-resource-overlays">资源覆盖层</a>才能予以启用。</p>
<p>您使用了叠加层的资源文件位于以下位置:
<code><a href="https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml">frameworks/base/core/res/res/values/config.xml</a></code>
</p><p>要启用圆形图标,请将叠加层文件中的 <code>config_useRoundIcon</code> 设置从 <code>false</code> 更改为 <code>true</code></p>
<pre class="devsite-click-to-copy">
&lt;!-- Flag indicating whether round icons should be parsed from the application manifest. --&gt;
&lt;bool name="config_useRoundIcon"&gt;true&lt;/bool&gt;
</pre>
</body></html>