Biểu Tượng Android

maylanhchuyennghiep.com 8.0 (API màn chơi 26) introduces adaptive launcher icons, which candisplay a variety of shapes across different device models. For example, anadaptive launcher icon can display a circular shape on one OEM device, anddisplay a squircle on another device. Each device OEM provides a mask, whichthe system then uses lớn render all adaptive icons with the same shape. Adaptivelauncher icons are also used in shortcuts, the Settings app, sharing dialogs,and the overview screen.

Bạn đang xem: Biểu tượng android


*
*

Figure 1. Adaptive icons tư vấn a variety of masks which vary from one device khổng lồ another.

You can control the look of your adaptive launcher icon by defining 2 layers,consisting of a background & a foreground. You must provide icon layers asdrawables without masks or background shadows around the outline of the icon.

*
Figure 2. Adaptive icons are defined using 2 layers & a mask.

In maylanhchuyennghiep.com 7.1 (API level 25) & earlier, launcher icons were sized at48 x 48 dp. You must now kích thước your icon layers using the following guidelines:

Both layers must be sized at 108 x 108 dp.The inner 72 x 72 dp of the icon appears within the masked viewport.The system reserves the outer 18 dp on each of the 4 sides khổng lồ createinteresting visual effects, such as parallax or pulsing.

Note: Animated visual effects are generated by supported launchers. Visual effects may vary from one launcher lớn another.

Caution: A device OEM can specify a mask that may include a radius that is as short as 33 dp along certain points of the shape.

Xem thêm: Biến Máy In Thường Thành Máy In Không Dây, Bật Mí Cách


*
*

Figure 3. Adaptive icons support a variety of visual effects.

Caution: If you don"t update your launcher icon with the necessary layers, the icon doesn"t look consistent with other icons that the system UI displays, và doesn"t tư vấn visual effects.

To learn how lớn create adaptive icons using maylanhchuyennghiep.com Studio, seeCreate app Icons with Image Asset Studio.

Creating adaptive icons in XML

To showroom an adaptive icon khổng lồ an ứng dụng using XML, begin by updating themaylanhchuyennghiep.com:icon attribute in your phầm mềm manifest to specify a drawable resource.You can also define an icon drawable resource using the maylanhchuyennghiep.com:roundIconattribute. You must only use the maylanhchuyennghiep.com:roundIcon attribute if you require adifferent icon asset for circular masks, if for example the branding of yourlogo relies on a circular shape. The following code snippet illustrates both ofthese attributes:

Next you must create alternative drawable resources in your ứng dụng for use withmaylanhchuyennghiep.com 8.0 (API cấp độ 26) in res/mipmap-anydpi-v26/ic_launcher.xml. You can thenuse the element khổng lồ define the foreground and background layerdrawables for your icons. The and inner elements both tư vấn the maylanhchuyennghiep.com:drawable attribute.

You can also define the background & foreground drawables as elementsby enclosing them in và elements.

If you want khổng lồ apply the same mask and visual effect to lớn your shortcuts asregular adaptive launcher icons, use one of the following techniques:

For static shortcuts, use the element.

For more information on shortcuts, seeApp Shortcuts.

Additional resources

For additional information on designing and implementing adaptive icons, readthis series of articles by Google designer và maylanhchuyennghiep.com Nick Butcher:


Content and code samples on this page are subject to lớn the licenses described in the content License. Java is a registered trademark of Oracle and/or its affiliates.


< "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" , "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" , "type": "thumb-down", "id": "outOfDate", "label":"Out of date" , "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" , "type": "thumb-down", "id": "otherDown", "label":"Other" > < "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy lớn understand" , "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" , "type": "thumb-up", "id": "otherUp", "label":"Other" >

More maylanhchuyennghiep.com

Discover

maylanhchuyennghiep.com Devices

Releases

Documentation và Downloads

Support


*
Language English Bahasa Indonesia Español – América Latina Português – Brasil 中文 – 简体 日本語 한국어