{"id":389124,"date":"2024-06-29T08:23:36","date_gmt":"2024-06-29T08:23:36","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=389124"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=389124","title":{"rendered":"<span>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0434\u043b\u044f Android 12. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0438\u0434\u0436\u0435\u0442\u044b \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Android, \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043b\u044e\u0431\u044f\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u044d\u043a\u0440\u0430\u043d \u0441\u0432\u043e\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0412 Android 12 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 API \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0434\u0438\u0437\u0430\u0439\u043d \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u044f\u0437\u044b\u043a\u043e\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u0430 &#171;<a href=\"https:\/\/material.io\/blog\/announcing-material-you\" rel=\"noopener noreferrer nofollow\">Material You<\/a>&#171;. \u042d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u0442\u0435\u043c\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0435 \u0443\u0433\u043b\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c80\/695\/214\/c80695214a030af5a8b0d2084822228c.png\" alt=\"\u0414\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (Android 11) \u0438 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u043e \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \u0438 \u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 (Android 12)\" title=\"\u0414\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (Android 11) \u0438 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u043e \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \u0438 \u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 (Android 12)\" width=\"764\" height=\"564\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c80\/695\/214\/c80695214a030af5a8b0d2084822228c.png\"\/><figcaption>\u0414\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (Android 11) \u0438 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u043e \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \u0438 \u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 (Android 12)<\/figcaption><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043c\u0438\u043d\u0438-\u0441\u0442\u0430\u0442\u0435\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0434\u043b\u044f Android 12. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Android 12 \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Android. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u043e\u0432\u044b\u0435 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c, \u043e\u0442\u0437\u044b\u0432\u0447\u0438\u0432\u044b\u043c \u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c. <\/p>\n<h3>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f <\/h3>\n<p>\u041d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043b\u044f \u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0446\u0432\u0435\u0442\u0430 \u0438 \u0440\u0430\u0434\u0438\u0443\u0441 \u0443\u0433\u043b\u043e\u0432, \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u0435\u0436\u0438\u0439 \u0432\u0438\u0434. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0442\u0435\u043c\u0443. <\/p>\n<h4>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 <\/h4>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=rLKtIGY2Mgc\" rel=\"noopener noreferrer nofollow\">Material You<\/a> \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442. \u0412 Android 12 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. \u0412\u0438\u0434\u0436\u0435\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <em>Theme.DeviceDefault.DayNight<\/em> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0446\u0432\u0435\u0442\u0430 \u0442\u0435\u043c\u044b \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0442\u0435\u043c\u0443 \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 <em>DeviceDefault<\/em> \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 \u043d\u0438\u0436\u0435 31.<\/p>\n<pre><code>values\/themes.xml  &lt;style name=\"Theme.AppWidget.AppWidgetContainer\"      parent=\"@android:style\/Theme.DeviceDefault\" \/><\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 31 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0442\u0435\u043c\u0443 DeviceDefault.DayNight \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u044b.<\/p>\n<pre><code>values-v31\/themes.xml  &lt;style name=\"Theme.AppWidget.AppWidgetContainer\"       parent=\"@android:style\/Theme.DeviceDefault.DayNight\" \/><\/code><\/pre>\n<blockquote>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>Theme.MaterialComponents.DayNight<\/em> \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0442\u0435\u043c\u044b \u0432\u043c\u0435\u0441\u0442\u043e <em>Theme.DeviceDefault<\/em>.<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u0430, \u043d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0441\u0432\u043e\u0435\u043c\u0443 \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0446\u0432\u0435\u0442\u0430 \u0442\u0435\u043c\u044b \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 view.<\/p>\n<pre><code>layout\/widget_checkbox_list_title_region.xml ... &lt;TextView android:id=\"@+id\/checkbox_list_title\"     android:layout_width=\"0dp\"     android:layout_height=\"wrap_content\"          android:layout_gravity=\"center_vertical\"      android:layout_marginStart=\"8dp\"      android:layout_weight=\"1\"      android:text=\"@string\/grocery_list\"      android:textColor=\"?android:attr\/textColorPrimary\" \/> &lt;ImageButton     android:layout_width=\"@dimen\/widget_element_min_length\"     android:layout_height=\"@dimen\/widget_element_min_length\"     android:background=\"?android:attr\/selectableItemBackground\"     android:clickable=\"true\"     android:contentDescription=\"@string\/add_button_grocery_list_content_description\"     android:src=\"@drawable\/ic_add_24\"     android:tint=\"?android:attr\/colorAccent\" \/> ...<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/57e\/e40\/aee\/57ee40aeeea8e8a7ceed866d70cbc61e.png\" alt=\"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 \u0432 \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \/ \u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u0435\" title=\"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 \u0432 \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \/ \u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u0435\" width=\"748\" height=\"388\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/57e\/e40\/aee\/57ee40aeeea8e8a7ceed866d70cbc61e.png\"\/><figcaption>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 \u0432 \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \/ \u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u0435<\/figcaption><\/figure>\n<h4>\u0417\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0435 \u0443\u0433\u043b\u044b <\/h4>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Android 12, \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0435 \u0443\u0433\u043b\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043a \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0443\u0433\u043b\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>system_app_widget_background_radius<\/em> \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u043a\u043e\u043d\u0442\u0443\u0440\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438 <em>system_app_widget_inner_radius<\/em> \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0430 8dp \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c <em>system_app_widget_background_radius<\/em>. <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0443\u0433\u043b\u0430\u043c, \u044d\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u0430\u0434\u0434\u0438\u043d\u0433, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0441 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0443\u0433\u043b\u0430\u043c\u0438.<\/p>\n<pre><code>values\/attrs.xml  &lt;declare-styleable name=\"AppWidgetAttrs\">     &lt;attr name=\"appWidgetPadding\" format=\"dimension\" \/>         &lt;attr name=\"appWidgetInnerRadius\" format=\"dimension\" \/>     &lt;attr name=\"appWidgetRadius\" format=\"dimension\" \/> &lt;\/declare-styleable>   values\/themes.xml  &lt;style name=\"Theme.AppWidget.AppWidgetContainerParent\"      parent=\"@android:style\/Theme.DeviceDefault\">     &lt;!-- Radius of the outer bound of widgets to make the rounded            corners -->     &lt;item name=\"appWidgetRadius\">16dp&lt;\/item>     &lt;!-- Radius of the inner view's bound of widgets to make the rounded corners. It needs to be 8dp or less than the value of appWidgetRadius -->     &lt;item name=\"appWidgetInnerRadius\">8dp&lt;\/item> &lt;\/style> &lt;style name=\"Theme.AppWidget.AppWidgetContainer\"      parent=\"Theme.AppWidget.AppWidgetContainerParent\">     &lt;!-- Apply padding to avoid the content of the widget colliding with the rounded corners -->     &lt;item name=\"appWidgetPadding\">16dp&lt;\/item> &lt;\/style>   values-v31\/themes.xml  &lt;style name=\"Theme.AppWidget.AppWidgetContainerParent\"      parent=\"@android:style\/Theme.DeviceDefault.DayNight\">      &lt;item name=\"appWidgetRadius\">         @android:dimen\/system_app_widget_background_radius&lt;\/item>           &lt;item name=\"appWidgetInnerRadius\">         @android:dimen\/system_app_widget_inner_radius&lt;\/item> &lt;\/style>   values\/styles.xml  &lt;style name=\"Widget.AppWidget.AppWidget.Container\"      parent=\"android:Widget\">     &lt;item name=\"android:id\">@android:id\/background&lt;\/item>     &lt;item name=\"android:background\">         ?android:attr\/colorBackground&lt;\/item> &lt;\/style><\/code><\/pre>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448 <em>minTargetSDK<\/em> \u043d\u0438\u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 21, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 21, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <em>android:attr\/colorBackground<\/em>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432 \u0447\u0435\u0440\u0442\u0435\u0436\u0430\u0445, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0440\u043e\u0432\u043d\u044f API 21.<\/p>\n<\/blockquote>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0442\u0435\u043c\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u0434\u043b\u044f layout-a \u0432\u0438\u0434\u0436\u0435\u0442\u0430.<\/p>\n<pre><code>layout\/widget_grocery_list.xml  &lt;LinearLayout     style=\"@style\/Widget.AppWidget.AppWidget.Container\">     ... &lt;\/LinearLayout><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0e1\/7ab\/88d\/0e17ab88d7fd4a46a2499201a47d3114.png\" alt=\"\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0443\u0433\u043b\u043e\u0432 \u043f\u0440\u043e\u0442\u0438\u0432 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432\" title=\"\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0443\u0433\u043b\u043e\u0432 \u043f\u0440\u043e\u0442\u0438\u0432 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432\" width=\"989\" height=\"550\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0e1\/7ab\/88d\/0e17ab88d7fd4a46a2499201a47d3114.png\"\/><figcaption>\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0443\u0433\u043b\u043e\u0432 \u043f\u0440\u043e\u0442\u0438\u0432 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432<\/figcaption><\/figure>\n<h4>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u044b <\/h4>\n<p>Android 12 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u042d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Android. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c id \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 <em>android:id\/background<\/em> \u043d\u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u043c\u0430\u043a\u0435\u0442\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430.<\/p>\n<pre><code>&lt;LinearLayout     android:id=\"@android:id\/background\">     ... &lt;\/LinearLayout><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/70a\/8f6\/dbf\/70a8f6dbf93c8f519e2a0c3e3f426c24.gif\" alt=\"\u0417\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\" title=\"\u0417\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\" width=\"720\" height=\"1480\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/70a\/8f6\/dbf\/70a8f6dbf93c8f519e2a0c3e3f426c24.gif\"\/><figcaption>\u0417\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434<\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"https:\/\/developer.android.com\/about\/versions\/12\/behavior-changes-12?hl=ca#notification-trampolines\" rel=\"noopener noreferrer nofollow\"><u>broadcast trampolines<\/u><\/a>, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 <em>PendingIntent<\/em> \u043f\u043e \u043a\u043b\u0438\u043a\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0438\u0437 \u0431\u0440\u043e\u0430\u0434\u043a\u0430\u0441\u0442\u0430 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u044d\u0442\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h3>\u041d\u043e\u0432\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432<\/h3>\n<h4>\u041f\u0440\u0435\u0432\u044c\u044e<\/h4>\n<p>\u0412 Android 12 \u0435\u0441\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432\u044b\u0431\u043e\u0440\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <em>drawable<\/em>, \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442-\u043f\u0438\u043a\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 XML-layout \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <em>ListView<\/em> \u0438\u043b\u0438 <em>GridView<\/em>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c layout \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u043a\u0435\u0442.<\/p>\n<pre><code>&lt;TextView     style=\"@style\/Widget.AppWidget.Checkbox\"     android:layout_width=\"match_parent\"     android:layout_height=\"wrap_content\"     android:text=\"@string\/widget_title_preview\" \/> &lt;TextView     style=\"@style\/Widget.AppWidget.Checkbox\"     android:layout_width=\"match_parent\"     android:layout_height=\"wrap_content\"     android:text=\"@string\/widget_subject_preview\" \/><\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u043c\u0430\u043a\u0435\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443, \u043a\u043e\u0433\u0434\u0430 \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043c\u0430\u043a\u0435\u0442\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u0442\u0435\u043c\u0443 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430.<\/p>\n<pre><code>&lt;resources>     &lt;!-- Declare attributes -->     &lt;attr name=\"widgetTitlePreview\" format=\"string\" \/>     &lt;attr name=\"widgetSubjectPreview\" format=\"string\" \/>     &lt;!-- Declare styles -->     &lt;style name=\"Theme.MyApp.Widget\"          parent=\"@style\/Theme.DeviceDefault.DayNight.AppWidget\">         &lt;item name=\"widgetTitlePreview\">&lt;\/item>         &lt;item name=\"widgetSubjectPreview\">&lt;\/item>     &lt;\/style>     &lt;style name=\"Theme.MyApp.Widget.Preview\">         &lt;item name=\"widgetTitlePreview\">Preview Title&lt;\/item>         &lt;item name=\"widgetSubjectPreview\">Preview Subject&lt;\/item>     &lt;\/style> &lt;\/resources><\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0435\u043c\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0435 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432 layout.<\/p>\n<pre><code>layout\/my_widget_preview.xml  &lt;LinearLayout ...>     &lt;include layout=\"@layout\/widget_header\"          android:theme=\u201d@style\/Theme.MyApp.Widget.Preview\u201d \/>&lt;\/LinearLayout>   layout\/my_widget_actual.xml  &lt;LinearLayout ...>     &lt;include layout=\"@layout\/widget_header\"         android:theme=\u201d@style\/Theme.MyApp.Widget\u201d \/> &lt;\/LinearLayout><\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c layout \u0432\u0438\u0434\u0436\u0435\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 previewLayout \u0434\u043b\u044f <em>appwidget-provider<\/em>.<\/p>\n<pre><code>xml\/app_widget_info_checkbox_list.xml  &lt;appwidget-provider     android:previewLayout=\"@layout\/widget_grocery_list\"     ...  \/><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1c8\/9c5\/b71\/1c89c5b712226f723e3b019bf964fa95.png\" alt=\"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c\" title=\"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c\" width=\"1054\" height=\"800\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1c8\/9c5\/b71\/1c89c5b712226f723e3b019bf964fa95.png\"\/><figcaption>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/figcaption><\/figure>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0432 <em>ListView<\/em>, <em>GridView<\/em> \u0438\u043b\u0438 <em>Stack<\/em>. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 layout \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0435\u0441\u0442\u043a\u043e \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u043c\u0430\u043a\u0435\u0442\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c layout, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0433 <em>&lt;include><\/em> \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043c\u0430\u043a\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043d\u043e\u0432\u044b\u0439 layout \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <em>previewLayout<\/em> \u0432 <em>appwidget-provider. <\/em><\/p>\n<h4>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/h4>\n<p>\u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <em>description<\/em>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0436\u0435\u0442-\u043f\u0438\u043a\u0435\u0440\u0435. \u0425\u043e\u0442\u044f \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442.<\/p>\n<pre><code>app_widget_info_checkbox_list.xml  &lt;appwidget-provider    android:description=\"@string\/app_widget_grocery_list_description\"    ...  \/><\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d21\/fd5\/c84\/d21fd5c846c2b0de2232d006eeb66d1e.png\" alt=\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\" title=\"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\" width=\"583\" height=\"425\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d21\/fd5\/c84\/d21fd5c846c2b0de2232d006eeb66d1e.png\"\/><figcaption>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430<\/figcaption><\/figure>\n<h3>\u0420\u0435\u0437\u044e\u043c\u0438\u0440\u0443\u044f <\/h3>\n<p>\u042d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e, \u043d\u0435 \u0442\u0430\u043a \u043b\u0438? \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u043a\u0430\u043a \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442 \u0432 \u0432\u0438\u0434\u0436\u0435\u0442-\u043f\u0438\u043a\u0435\u0440\u0435. \u042d\u0442\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0432\u0430\u0448\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0434\u043b\u044f Android 12, \u0438 \u0432\u0430\u0448\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u044f\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0437\u043d\u0438\u0446\u0443. \u041d\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u043e\u0432\u044b\u0435 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0430\u0448\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438, \u0431\u043e\u043b\u0435\u0435 \u043e\u0442\u0437\u044b\u0432\u0447\u0438\u0432\u044b\u043c\u0438 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438.<\/p>\n<p><a href=\"https:\/\/medium.com\/androiddevelopers\/updating-your-widget-for-android-12-92e7de87424c\" rel=\"noopener noreferrer nofollow\">\u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/573806\/\"> https:\/\/habr.com\/ru\/articles\/573806\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0438\u0434\u0436\u0435\u0442\u044b \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Android, \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0432\u043e\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043b\u044e\u0431\u044f\u0442 \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u044d\u043a\u0440\u0430\u043d \u0441\u0432\u043e\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0412 Android 12 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 API \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u0434\u0438\u0437\u0430\u0439\u043d \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u044f\u0437\u044b\u043a\u043e\u043c \u0434\u0438\u0437\u0430\u0439\u043d\u0430 &#171;<a href=\"https:\/\/material.io\/blog\/announcing-material-you\" rel=\"noopener noreferrer nofollow\">Material You<\/a>&#171;. \u042d\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u0442\u0435\u043c\u044b \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0435 \u0443\u0433\u043b\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043b\u0443\u0447\u0448\u0430\u044e\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c\u043e\u0441\u0442\u044c \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432.<\/p>\n<figure class=\"full-width\"><figcaption>\u0414\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 (Android 11) \u0438 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0441\u043e \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \u0438 \u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 (Android 12)<\/figcaption><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043c\u0438\u043d\u0438-\u0441\u0442\u0430\u0442\u0435\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0434\u043b\u044f Android 12. \u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Android 12 \u0438 \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Android. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u043e\u0432\u044b\u0435 API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c, \u043e\u0442\u0437\u044b\u0432\u0447\u0438\u0432\u044b\u043c \u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c. <\/p>\n<h3>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f <\/h3>\n<p>\u041d\u0435\u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043b\u044f \u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u0446\u0432\u0435\u0442\u0430 \u0438 \u0440\u0430\u0434\u0438\u0443\u0441 \u0443\u0433\u043b\u043e\u0432, \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u0435\u0436\u0438\u0439 \u0432\u0438\u0434. \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043c\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0442\u0435\u043c\u0443. <\/p>\n<h4>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 <\/h4>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=rLKtIGY2Mgc\" rel=\"noopener noreferrer nofollow\">Material You<\/a> \u043d\u0430\u0446\u0435\u043b\u0435\u043d \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043e\u043f\u044b\u0442. \u0412 Android 12 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. \u0412\u0438\u0434\u0436\u0435\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <em>Theme.DeviceDefault.DayNight<\/em> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0446\u0432\u0435\u0442\u0430 \u0442\u0435\u043c\u044b \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0442\u0435\u043c\u0443 \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 <em>DeviceDefault<\/em> \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 \u043d\u0438\u0436\u0435 31.<\/p>\n<pre><code>values\/themes.xml  &lt;style name=\"Theme.AppWidget.AppWidgetContainer\"      parent=\"@android:style\/Theme.DeviceDefault\" \/><\/code><\/pre>\n<p>\u0414\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 31 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0443\u044e \u0442\u0435\u043c\u0443 DeviceDefault.DayNight \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u044b.<\/p>\n<pre><code>values-v31\/themes.xml  &lt;style name=\"Theme.AppWidget.AppWidgetContainer\"       parent=\"@android:style\/Theme.DeviceDefault.DayNight\" \/><\/code><\/pre>\n<blockquote>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>Theme.MaterialComponents.DayNight<\/em> \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0442\u0435\u043c\u044b \u0432\u043c\u0435\u0441\u0442\u043e <em>Theme.DeviceDefault<\/em>.<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u0430, \u043d\u0430\u0437\u043d\u0430\u0447\u044c\u0442\u0435 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0441\u0432\u043e\u0435\u043c\u0443 \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0446\u0432\u0435\u0442\u0430 \u0442\u0435\u043c\u044b \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 view.<\/p>\n<pre><code>layout\/widget_checkbox_list_title_region.xml ... &lt;TextView android:id=\"@+id\/checkbox_list_title\"     android:layout_width=\"0dp\"     android:layout_height=\"wrap_content\"          android:layout_gravity=\"center_vertical\"      android:layout_marginStart=\"8dp\"      android:layout_weight=\"1\"      android:text=\"@string\/grocery_list\"      android:textColor=\"?android:attr\/textColorPrimary\" \/> &lt;ImageButton     android:layout_width=\"@dimen\/widget_element_min_length\"     android:layout_height=\"@dimen\/widget_element_min_length\"     android:background=\"?android:attr\/selectableItemBackground\"     android:clickable=\"true\"     android:contentDescription=\"@string\/add_button_grocery_list_content_description\"     android:src=\"@drawable\/ic_add_24\"     android:tint=\"?android:attr\/colorAccent\" \/> ...<\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043f\u0440\u043e\u0442\u0438\u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 \u0432 \u0441\u0432\u0435\u0442\u043b\u043e\u0439 \/ \u0442\u0435\u043c\u043d\u043e\u0439 \u0442\u0435\u043c\u0435<\/figcaption><\/figure>\n<h4>\u0417\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0435 \u0443\u0433\u043b\u044b <\/h4>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 Android 12, \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0435 \u0443\u0433\u043b\u044b \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043a \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u0443\u0433\u043b\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>system_app_widget_background_radius<\/em> \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u043a\u043e\u043d\u0442\u0443\u0440\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438 <em>system_app_widget_inner_radius<\/em> \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043d\u0430 8dp \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c <em>system_app_widget_background_radius<\/em>. <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438\u043c\u0435\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0435 \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0443\u0433\u043b\u0430\u043c, \u044d\u0442\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u0430\u0434\u0434\u0438\u043d\u0433, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0441 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0443\u0433\u043b\u0430\u043c\u0438.<\/p>\n<pre><code>values\/attrs.xml  &lt;declare-styleable name=\"AppWidgetAttrs\">     &lt;attr name=\"appWidgetPadding\" format=\"dimension\" \/>         &lt;attr name=\"appWidgetInnerRadius\" format=\"dimension\" \/>     &lt;attr name=\"appWidgetRadius\" format=\"dimension\" \/> &lt;\/declare-styleable>   values\/themes.xml  &lt;style name=\"Theme.AppWidget.AppWidgetContainerParent\"      parent=\"@android:style\/Theme.DeviceDefault\">     &lt;!-- Radius of the outer bound of widgets to make the rounded            corners -->     &lt;item name=\"appWidgetRadius\">16dp&lt;\/item>     &lt;!-- Radius of the inner view's bound of widgets to make the rounded corners. It needs to be 8dp or less than the value of appWidgetRadius -->     &lt;item name=\"appWidgetInnerRadius\">8dp&lt;\/item> &lt;\/style> &lt;style name=\"Theme.AppWidget.AppWidgetContainer\"      parent=\"Theme.AppWidget.AppWidgetContainerParent\">     &lt;!-- Apply padding to avoid the content of the widget colliding with the rounded corners -->     &lt;item name=\"appWidgetPadding\">16dp&lt;\/item> &lt;\/style>   values-v31\/themes.xml  &lt;style name=\"Theme.AppWidget.AppWidgetContainerParent\"      parent=\"@android:style\/Theme.DeviceDefault.DayNight\">      &lt;item name=\"appWidgetRadius\">         @android:dimen\/system_app_widget_background_radius&lt;\/item>           &lt;item name=\"appWidgetInnerRadius\">         @android:dimen\/system_app_widget_inner_radius&lt;\/item> &lt;\/style>   values\/styles.xml  &lt;style name=\"Widget.AppWidget.AppWidget.Container\"      parent=\"android:Widget\">     &lt;item name=\"android:id\">@android:id\/background&lt;\/item>     &lt;item name=\"android:background\">         ?android:attr\/colorBackground&lt;\/item> &lt;\/style><\/code><\/pre>\n<blockquote>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448 <em>minTargetSDK<\/em> \u043d\u0438\u0436\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 21, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u0438 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 21, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <em>android:attr\/colorBackground<\/em>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432 \u0447\u0435\u0440\u0442\u0435\u0436\u0430\u0445, \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u0440\u043e\u0432\u043d\u044f API 21.<\/p>\n<\/blockquote>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u0442\u0435\u043c\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u0434\u043b\u044f layout-a \u0432\u0438\u0434\u0436\u0435\u0442\u0430.<\/p>\n<pre><code>layout\/widget_grocery_list.xml  &lt;LinearLayout     style=\"@style\/Widget.AppWidget.AppWidget.Container\">     ... &lt;\/LinearLayout><\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u041a\u0430\u043a \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0443\u0433\u043b\u043e\u0432 \u043f\u0440\u043e\u0442\u0438\u0432 \u0437\u0430\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432<\/figcaption><\/figure>\n<h4>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u044b <\/h4>\n<p>Android 12 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u042d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Android. \u0427\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c id \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 <em>android:id\/background<\/em> \u043d\u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u043c\u0430\u043a\u0435\u0442\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430.<\/p>\n<pre><code>&lt;LinearLayout     android:id=\"@android:id\/background\">     ... &lt;\/LinearLayout><\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0417\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434<\/figcaption><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"https:\/\/developer.android.com\/about\/versions\/12\/behavior-changes-12?hl=ca#notification-trampolines\" rel=\"noopener noreferrer nofollow\"><u>broadcast trampolines<\/u><\/a>, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 <em>PendingIntent<\/em> \u043f\u043e \u043a\u043b\u0438\u043a\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0438\u0437 \u0431\u0440\u043e\u0430\u0434\u043a\u0430\u0441\u0442\u0430 \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u044d\u0442\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h3>\u041d\u043e\u0432\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432<\/h3>\n<h4>\u041f\u0440\u0435\u0432\u044c\u044e<\/h4>\n<p>\u0412 Android 12 \u0435\u0441\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432\u044b\u0431\u043e\u0440\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432. \u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 <em>drawable<\/em>, \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442-\u043f\u0438\u043a\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 XML-layout \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a <em>ListView<\/em> \u0438\u043b\u0438 <em>GridView<\/em>, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c layout \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043c\u0430\u043a\u0435\u0442.<\/p>\n<pre><code>&lt;TextView     style=\"@style\/Widget.AppWidget.Checkbox\"     android:layout_width=\"match_parent\"     android:layout_height=\"wrap_content\"     android:text=\"@string\/widget_title_preview\" \/> &lt;TextView     style=\"@style\/Widget.AppWidget.Checkbox\"     android:layout_width=\"match_parent\"     android:layout_height=\"wrap_content\"     android:text=\"@string\/widget_subject_preview\" \/><\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 \u043c\u0430\u043a\u0435\u0442\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443, \u043a\u043e\u0433\u0434\u0430 \u0444\u0435\u0439\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u044d\u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043c\u0430\u043a\u0435\u0442\u0430 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u0442\u0435\u043c\u0443 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430.<\/p>\n<pre><code>&lt;resources>     &lt;!-- Declare attributes -->     &lt;attr name=\"widgetTitlePreview\" format=\"string\" \/>     &lt;attr name=\"widgetSubjectPreview\" format=\"string\" \/>     &lt;!-- Declare styles -->     &lt;style name=\"Theme.MyApp.Widget\"          parent=\"@style\/Theme.DeviceDefault.DayNight.AppWidget\">         &lt;item name=\"widgetTitlePreview\">&lt;\/item>         &lt;item name=\"widgetSubjectPreview\">&lt;\/item>     &lt;\/style>     &lt;style name=\"Theme.MyApp.Widget.Preview\">         &lt;item name=\"widgetTitlePreview\">Preview Title&lt;\/item>         &lt;item name=\"widgetSubjectPreview\">Preview Subject&lt;\/item>     &lt;\/style> &lt;\/resources><\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0435\u043c\u0430 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0435 \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432 layout.<\/p>\n<pre><code>layout\/my_widget_preview.xml  &lt;LinearLayout ...>     &lt;include layout=\"@layout\/widget_header\"          android:theme=\u201d@style\/Theme.MyApp.Widget.Preview\u201d \/>&lt;\/LinearLayout>   layout\/my_widget_actual.xml  &lt;LinearLayout ...>     &lt;include layout=\"@layout\/widget_header\"         android:theme=\u201d@style\/Theme.MyApp.Widget\u201d \/> &lt;\/LinearLayout><\/code><\/pre>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c layout \u0432\u0438\u0434\u0436\u0435\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 previewLayout \u0434\u043b\u044f <em>appwidget-provider<\/em>.<\/p>\n<pre><code>xml\/app_widget_info_checkbox_list.xml  &lt;appwidget-provider     android:previewLayout=\"@layout\/widget_grocery_list\"     ...  \/><\/code><\/pre>\n<figure class=\"full-width\"><figcaption>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/figcaption><\/figure>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u043c\u0430\u043a\u0435\u0442\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0445 \u0432 <em>ListView<\/em>, <em>GridView<\/em> \u0438\u043b\u0438 <em>Stack<\/em>. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 layout \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0435\u0441\u0442\u043a\u043e \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u043c\u0430\u043a\u0435\u0442\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c layout, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0433 <em>&lt;include><\/em> \u0434\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0435\u0445<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-389124","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/389124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=389124"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/389124\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=389124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=389124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=389124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}