{"id":349130,"date":"2023-06-21T09:02:00","date_gmt":"2023-06-21T09:02:00","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=349130"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-06-21T09:02:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=349130","title":{"rendered":"<span>\u041a\u0430\u043a\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 Ripple?<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/6a5\/f0f\/55d\/6a5f0f55d10331df6bfec0fb330a5bd7.jpg\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a5\/f0f\/55d\/6a5f0f55d10331df6bfec0fb330a5bd7.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u043e\u0437\u043d\u0438\u043a \u0443 \u043c\u0435\u043d\u044f \u043e\u0434\u043d\u0430\u0436\u0434\u044b. \u0410 \u043f\u043e\u0442\u043e\u043c \u0435\u0449\u0435 \u0440\u0430\u0437. \u0418 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f.<br \/>\u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442. \u0417\u0430\u0442\u043e \u0435\u0441\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u0443\u0434\u0435\u0442. \u041d\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. <br \/>\u041e\u0431\u043e \u0432\u0441\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<h2>\u0427\u0442\u043e \u0435\u0441\u0442\u044c Ripple<\/h2>\n<p><strong>Ripple effect <\/strong>\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u043a &#171;\u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442&#187;. <br \/>\u0417\u0430\u0431\u0430\u0432\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u044f \u0443\u0437\u043d\u0430\u043b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0445\u043e\u0442\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u0432\u043d\u043e. <\/p>\n<p><strong>Ripple <\/strong>\u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c &#171;\u0432\u043e\u043b\u043d\u043e\u0432\u044b\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c&#187;, \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u043c \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u0432 Android.<\/p>\n<p>\u0417\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 <a href=\"https:\/\/developer.android.com\/reference\/android\/graphics\/drawable\/RippleDrawable\">RippleDrawable<\/a>. \u041e\u043d \u0438 \u0432\u0435\u0434\u0435\u0442 \u043a \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0442\u0435\u0440\u043c\u0438\u043d\u0430:<\/p>\n<blockquote>\n<p>Drawable that shows a ripple effect in response to <strong>state <\/strong>changes.<\/p>\n<\/blockquote>\n<p><strong>Ripple<\/strong> \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 Android Lollipop. \u0417\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0435\u0449\u0435? <strong>Material Design<\/strong>. <\/p>\n<h2>Ripple &amp; Material Design 2<\/h2>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u0437\u0434\u0435\u0441\u044c <strong>Material Design<\/strong>? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <a href=\"https:\/\/m2.material.io\/design\/interaction\/states.html\">\u0442\u0430\u043c<\/a> \u0434\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f <strong>State<\/strong>*.<\/p>\n<details class=\"spoiler\">\n<summary>*<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042d\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 <strong>State<\/strong> \u0432 <strong>RippleDrawable<\/strong>, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e \u043d\u0435\u0433\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e<\/p>\n<ul>\n<li>\n<p><strong>Material Design<\/strong> \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0430 <strong>RippleDrawable<\/strong> \u2014 \u0447\u0430\u0441\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c <strong>Material Design<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <strong>RippleDrawable.<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043f\u0440\u043e <strong>Jetpack Compose<\/strong>, \u0430 \u0442\u0430\u043c <strong>Ripple<\/strong> \u2014 \u0447\u0430\u0441\u0442\u044c <strong>Material Design.<\/strong><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<blockquote>\n<p>States are visual representations used to communicate the status of a component or interactive element.<\/p>\n<\/blockquote>\n<p><strong>State<\/strong> \u2014 \u044d\u0442\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u0438\u043c\u0435\u0440 \u2014 pressed, focused.<\/p>\n<p>\u0412\u0441\u0435\u0433\u043e \u0435\u0441\u0442\u044c 11 \u0442\u0438\u043f\u043e\u0432 \u043f\u043e\u0434 <strong>State<\/strong>, \u0447\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. <br \/>\u041a\u0443\u0434\u0430 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0442\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 (\u0442\u0438\u043f\u0430 pressed).<\/p>\n<p>\u0417\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f, <a href=\"https:\/\/m2.material.io\/design\/interaction\/states.html#anatomy\">Overlay<\/a>.<\/p>\n<blockquote>\n<p>An overlay is a semi-transparent covering on an element that indicates its state.<\/p>\n<\/blockquote>\n<p>\u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c (\u0430 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u043d \u043f\u043e\u0442\u043e\u043c).<br \/>\u0427\u0442\u043e \u0435\u0441\u0442\u044c <em>covering<\/em>? \u042d\u0442\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u0435\u0440\u0445\u0443.<\/p>\n<p><strong>Overlay<\/strong> \u2014 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u0438 <strong>State<\/strong>&#8216;a.<\/p>\n<p><strong>Ripple<\/strong> \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 <strong>Overlay<\/strong>.<\/p>\n<p>\u0426\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Overlay<\/strong> \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0446\u0432\u0435\u0442\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<br \/>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<ul>\n<li>\n<p>\u041d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u2014 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u2014 <em>primary<\/em><\/p>\n<\/li>\n<li>\n<p>\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u2014 <em>onPrimary<\/em><\/p>\n<\/li>\n<li>\n<p>\u0426\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Overlay<\/strong> \u2014 <em>onPrimary<\/em><\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f <strong>Overlay<\/strong>, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/224\/965\/724\/224965724c34b2a7069a8921997ffe9a.png\" alt=\"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 20%-\u0439 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434 Overlay\" title=\"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 20%-\u0439 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434 Overlay\" width=\"1574\" height=\"1736\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/224\/965\/724\/224965724c34b2a7069a8921997ffe9a.png\"\/><\/p>\n<div><figcaption>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 20%-\u0439 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434 <strong>Overlay<\/strong><\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441 <strong>Pressed State<\/strong> \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u043c <strong>Ripple<\/strong> (<strong>Overlay<\/strong>). \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u0440\u0430\u0432\u0443\u044e \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0443, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e, <strong>Overlay <\/strong>\u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0438\u0436\u043d\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0442\u0435\u043c\u043d\u044f\u0435\u0442 \u0435\u0433\u043e (\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>covering<\/em>).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/72d\/ec5\/75e\/72dec575e789c8be2497f9a6677b5d59.png\" alt=\"Pressed State \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 Overlay\" title=\"Pressed State \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 Overlay\" width=\"1064\" height=\"532\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72d\/ec5\/75e\/72dec575e789c8be2497f9a6677b5d59.png\"\/><\/p>\n<div><figcaption><strong>Pressed State<\/strong> \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 <strong>Overlay<\/strong><\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c <strong>Ripple<\/strong> \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 <strong>Material Design<\/strong>, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u043f\u043e\u0434 <a href=\"https:\/\/m2.material.io\/develop\/ios\/supporting\/ripple\">iOS<\/a> \u0438 <a href=\"https:\/\/m2.material.io\/develop\/web\/supporting\/ripple\">Web<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e \u043d\u0438\u0445 \u043d\u0438\u0447\u0435\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443.<\/p>\n<h2>Ripple &amp; Material Design 3<\/h2>\n<p>\u0412 <a href=\"https:\/\/m3.material.io\/foundations\/interaction\/states\/overview\">Material Design 3<\/a> \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b.<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e <strong>State<\/strong>&#8216;\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>Overlay<\/strong> \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043b\u0438 \u0432 <strong>State Layer.<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0435\u0449\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u0442, \u0447\u0442\u043e <strong>\u043a\u043e\u043d\u0442\u0435\u043d\u0442<\/strong> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0434 <strong>State Layer<\/strong>, \u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0436\u0435 \u043c\u0435\u0441\u0442\u0435 \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0432\u044b\u043c \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c9a\/120\/2d6\/c9a1202d699ea1bc32726355ff368e6f.png\" alt=\"\u041a\u043e\u043d\u0442\u0435\u043d\u0442 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0434 State Layer???\" title=\"\u041a\u043e\u043d\u0442\u0435\u043d\u0442 \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0434 State Layer???\" width=\"988\" height=\"904\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c9a\/120\/2d6\/c9a1202d699ea1bc32726355ff368e6f.png\"\/><\/p>\n<div><figcaption><strong>\u041a\u043e\u043d\u0442\u0435\u043d\u0442<\/strong> \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0434 <strong>State Layer<\/strong>???<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c21\/0e0\/3ba\/c210e03baaf47965064148ccb64c0a05.png\" alt=\".\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e State Layer \u0437\u0430\u0442\u0435\u043c\u043d\u044f\u0435\u0442 \u0446\u0432\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (\u0442\u0435\u043a\u0441\u0442\u0430), \u0438\u0437 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e State Layer \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0434 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c\" title=\".\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e State Layer \u0437\u0430\u0442\u0435\u043c\u043d\u044f\u0435\u0442 \u0446\u0432\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (\u0442\u0435\u043a\u0441\u0442\u0430), \u0438\u0437 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e State Layer \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0434 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c\" width=\"1004\" height=\"600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c21\/0e0\/3ba\/c210e03baaf47965064148ccb64c0a05.png\"\/><\/p>\n<div><figcaption>.\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e <strong>State Layer <\/strong>\u0437\u0430\u0442\u0435\u043c\u043d\u044f\u0435\u0442 \u0446\u0432\u0435\u0442 <strong>\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 <\/strong>(\u0442\u0435\u043a\u0441\u0442\u0430), \u0438\u0437 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e <strong>State Layer<\/strong> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0434 <strong>\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c<\/strong><\/figcaption><\/div>\n<\/figure>\n<h2>Ripple &amp; XML<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0435\u0449\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <strong>Material Design<\/strong>, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <strong>Ripple<\/strong> \u0432 <strong>XML<\/strong> \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c:<\/p>\n<ol>\n<li>\n<p>\u0412 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>android:foreground<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0441\u044f <code>?selectableItemBackground<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>android:clickable<\/code>, \u0440\u0430\u0432\u043d\u044b\u0439 <code>true<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e <strong>Ripple<\/strong> \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u044f\u0445 (\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u043e \u0432\u0441\u0435\u0445) \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e \u043a\u0443\u0447\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>android:focusable<\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>true<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 <strong>clickable<\/strong> \u0431\u0435\u0437 <strong>focusable<\/strong> \u0440\u0443\u0433\u0430\u043b\u0441\u044f Lint.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"xml\">&lt;... android:foreground = \"?selectableItemBackground\" android:clickable = \"true\" android:focusable = \"true\" \/> <\/code><\/pre>\n<p>\u0412\u0441\u0435? \u0418 \u0434\u0430, \u0438 \u043d\u0435\u0442.<\/p>\n<ul>\n<li>\n<p><code>android:foreground<\/code>  \u0434\u043e <strong>API level 23<\/strong> \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 <a href=\"https:\/\/stackoverflow.com\/questions\/52329249\/why-doesnt-androidforeground-attribute-work\">\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b<\/a> \u043d\u0438 \u043d\u0430 \u0447\u0435\u043c, \u043a\u0440\u043e\u043c\u0435 <strong>FrameLayout<\/strong>. \u0415\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u043b\u0438 \u043d\u0430 <code>android:background<\/code>, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u043d\u0435 <strong>overlay<\/strong>, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e <strong>background.<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u043d\u0446\u044b \u0441 \u0431\u0443\u0431\u043d\u043e\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f <a href=\"https:\/\/stackoverflow.com\/questions\/33061050\/how-can-i-modify-ripple-color-when-using-attr-selectableitembackground-as-backg\">\u0437\u0430\u043c\u0435\u043d\u044b \u0446\u0432\u0435\u0442\u0430<\/a> \u0443 <strong>Ripple<\/strong>. \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <strong>ThemeOverlay<\/strong>, \u0432 \u043d\u0435\u043c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c <code>android:colorControlHighlight<\/code> \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 <strong>ThemeOverlay<\/strong> \u0447\u0435\u0440\u0435\u0437 <code>android:theme<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 <strong>Ripple<\/strong> \u043d\u0430 \u0431\u0430\u0437\u0435 <strong>RippleDrawable<\/strong> \u0438 \u043d\u0435 \u043c\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0441 \u0446\u0432\u0435\u0442\u0430\u043c\u0438.<\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e, \u0432\u0441\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/developer.android.com\/training\/material\/animations\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>\u041d\u0430 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 <strong>Material Design<\/strong> \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u0427\u0442\u043e \u0434\u043e <strong>Material Design<\/strong>, \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c <a href=\"https:\/\/developer.android.com\/reference\/com\/google\/android\/material\/card\/MaterialCardView#attr_MaterialCardView_rippleColor\">MaterialCardView<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0446\u0432\u0435\u0442 <strong>Ripple<\/strong> \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442. <\/p>\n<h2>Ripple &amp; Jetpack Compose<\/h2>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f <strong>Jetpack Compose<\/strong>, \u0442\u043e \u0437\u0434\u0435\u0441\u044c <strong>Ripple<\/strong> \u2014 \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u044c <strong>Material Design<\/strong>.<\/p>\n<p>\u0412\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <strong>Ripple<\/strong> \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a <a href=\"https:\/\/developer.android.com\/reference\/kotlin\/androidx\/compose\/material\/ripple\/package-summary\">\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/a>.<br \/><strong>Material Design 2<\/strong> \u0438 <strong>Material Design 3<\/strong>, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443.<br \/>\u0410 \u0435\u0449\u0435, \u043a\u0430\u043a \u0431\u043e\u043d\u0443\u0441, \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0434\u0438\u0437\u0430\u0439\u043d-\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>Ripple<\/strong> \u043d\u043e, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 <strong>Material<\/strong>&#8216;\u043e\u0432.<\/p>\n<h3>Ripple &amp; Jetpack Compose \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong>Material Design 2<\/strong>.<br \/>(\u043e\u043d \u0436\u0435 <code>androidx.compose.material:material<\/code> \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445).<\/p>\n<pre><code class=\"kotlin\">@Composable fun Content() {     MaterialTheme {         Text(             modifier = Modifier.clickable { },             text = \"Hello world!\"         )     } }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u2014 \u0432\u0438\u0434\u0438\u043c <strong>Ripple<\/strong>. <\/p>\n<p>\u0417\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c <code>MaterialTheme<\/code> (3 \u0438 8 \u0441\u0442\u0440\u043e\u043a\u0438).<br \/>\u0422\u0435\u043f\u0435\u0440\u044c <strong>Ripple<\/strong> \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u0437\u0430\u0442\u0435\u043c\u043d\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/026\/2e7\/a8e\/0262e7a8efc1cd3f5792e85eaca648ee.gif\" alt=\"\u0421\u043b\u0435\u0432\u0430 \u2014 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 MaterialTheme, \u0441\u043f\u0440\u0430\u0432\u0430 \u2014 \u0431\u0435\u0437(\u0430 \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0441\u044f)\" title=\"\u0421\u043b\u0435\u0432\u0430 \u2014 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 MaterialTheme, \u0441\u043f\u0440\u0430\u0432\u0430 \u2014 \u0431\u0435\u0437(\u0430 \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0441\u044f)\" width=\"618\" height=\"196\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/026\/2e7\/a8e\/0262e7a8efc1cd3f5792e85eaca648ee.gif\"\/><\/p>\n<div><figcaption>\u0421\u043b\u0435\u0432\u0430 \u2014 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 <code>MaterialTheme<\/code>, \u0441\u043f\u0440\u0430\u0432\u0430 \u2014 \u0431\u0435\u0437<br \/>(\u0430 \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0441\u044f)<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e <code>MaterialTheme<\/code> \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 <code>Modifier.clickable { }<\/code>  \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 <strong>Ripple<\/strong>. \u041d\u043e \u043a\u0430\u043a?<\/p>\n<p>\u0417\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <code>Modifier.clickable { }<\/code>. <\/p>\n<pre><code class=\"kotlin\">fun Modifier.clickable(     ... ) = composed(...) {     Modifier.clickable(         ...         indication = LocalIndication.current,         interactionSource = remember { MutableInteractionSource() }     ) }<\/code><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <code>MutableInteractionSource<\/code> \u0438 <code>Indication<\/code>. \u041f\u043e\u0447\u0438\u0442\u0430\u0435\u043c <a href=\"https:\/\/developer.android.com\/reference\/kotlin\/androidx\/compose\/foundation\/package-summary#(androidx.compose.ui.Modifier).clickable(androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.foundation.Indication,kotlin.Boolean,kotlin.String,androidx.compose.ui.semantics.Role,kotlin.Function0)\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a> \u043c\u0435\u0442\u043e\u0434\u0430. <\/p>\n<blockquote>\n<p><strong>indication<\/strong> &#8212; indication to be shown when modified element is pressed. Be default, indication from <code>LocalIndication<\/code> will be used. Pass <strong>null<\/strong> to show no indication, or current value from <code>LocalIndication<\/code> to show theme default<\/p>\n<\/blockquote>\n<p>\u0421\u0442\u0430\u043b\u043e \u0431\u044b\u0442\u044c, \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <strong>Ripple <\/strong>\u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>Indication<\/code>.<br \/>\u041d\u0443 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <strong>Ripple <\/strong>\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>LocalIndication<\/code>.<\/p>\n<p>\u041d\u043e \u043f\u0440\u0438 \u0447\u0435\u043c \u0437\u0434\u0435\u0441\u044c <code>MutableInteractionSource<\/code>? <\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f. <br \/>\u0417\u0430\u043e\u0434\u043d\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0439, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/p>\n<h3>Interaction<\/h3>\n<p><code>MutableInteractionSource<\/code> \u2014 \u044d\u0442\u043e, \u043f\u043e \u0441\u0443\u0442\u0438, <code>Flow&lt;Interaction><\/code>. <\/p>\n<p><code>Interaction<\/code> \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0447\u0430\u043b \u0438\u043b\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b \u043d\u0430\u0436\u0430\u0442\u0438\u0435, \u0432\u0437\u044f\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u0444\u043e\u043a\u0443\u0441.<\/p>\n<p><code>Interaction<\/code> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412\u0441\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0440\u044f\u043c\u044b\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 <code>Interaction<\/code>: <br \/><code>PressInteraction<\/code> , <code>FocusInteraction<\/code> , <code>HoverInteraction<\/code> , <code>DragInteraction<\/code>.<\/p>\n<p>\u0418\u0445 \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u043d\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043f\u0440\u044f\u043c\u044b\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0447\u0435\u043a: \u043e\u0434\u043d\u0443 \u043f\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0432\u0442\u043e\u0440\u0443\u044e \u2014 \u043f\u043e\u0434 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435, \u0442\u0440\u0435\u0442\u044c\u044e (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e) \u2014 \u043f\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0443.<br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 <a href=\"https:\/\/developer.android.com\/reference\/kotlin\/androidx\/compose\/foundation\/interaction\/PressInteraction\">PressInteraction<\/a> \u044d\u0442\u043e <code>Press<\/code>, <code>Release<\/code> \u0438 <code>Cancel<\/code>. <\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u043e?<\/p>\n<p><code>MutableInteractionSource<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"kotlin\">val interactionSource = remember { MutableInteractionSource() } val isPressed by interactionSource.collectIsPressedAsState()  Button(     onClick = { \/* do something *\/ },     interactionSource = interactionSource) {     Text(if (isPressed) \"Pressed!\" else \"Not pressed\") }<\/code><\/pre>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e <code>Interaction<\/code> \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u0432 <a href=\"https:\/\/developer.android.com\/jetpack\/compose\/touch-input\/handling-interactions\">\u0434\u0430\u043d\u043d\u043e\u043c \u0433\u0430\u0439\u0434\u0435<\/a>.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0437\u0430\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0433\u043b\u0443\u0431\u0436\u0435 \u0432 <code>Modifier.clickable { }<\/code>, \u0442\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <code>Modifier.hoverable()<\/code> \u0438 <code>Modifier.focusable()<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f <strong>interactionSource<\/strong> \u0438\u0437 <code>Modifier.clickable { }<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c <code>Interaction<\/code>&#8216;\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u043f\u043e <strong>focus<\/strong>, \u0438 \u043f\u043e <strong>hover<\/strong>.<\/p>\n<h3>Indication<\/h3>\n<p><code>Indication<\/code> \u2014 \u044d\u0442\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 <code>Interaction<\/code>&#8216;\u043e\u0432.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u043d\u043e \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 <code>Flow&lt;Interaction><\/code> \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>IndicationInstance<\/code>, \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u043e\u0439.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <code>Indication<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <code>Interaction<\/code>.<br \/>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0432 \u043f\u0430\u0440\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e <code>Indication<\/code>, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <code>Modifier.indication(...)<\/code>, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <code>InteractionSource<\/code> \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043e\u0442 \u043d\u0435\u0433\u043e <code>Indication<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c <code>Ripple<\/code> \u0438 <code>DefaultDebugIndication<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u0441 <code>MaterialTheme<\/code> \u0432 <code>LocalIndication<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>Ripple<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u0431\u0435\u0437 <code>MaterialTheme<\/code> \u0432 <code>LocalIndication<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>DefaultDebugIndication<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438 \u0432\u0438\u0434\u0438\u043c &#171;\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u0437\u0430\u0442\u0435\u043c\u043d\u0435\u043d\u0438\u0435&#187; \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438.<\/p>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a <code>Modifier.clickable { }<\/code>. <br \/>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043c\u0435\u0442\u043e\u0434 \u0441 <code>MutableInteractionSource<\/code> \u0438 <code>Indication<\/code>?<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f <code>Interaction<\/code>&#8216;\u043e\u0432<br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430\u0436\u0430\u0442<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e (\u0432 <code>LocalIndication<\/code>) <code>Indication<\/code>&#8216;a<br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 (\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f)<\/p>\n<\/li>\n<\/ol>\n<h3>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Compose Material Ripple<\/h3>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c <code>Interaction<\/code> \u0438 <code>Indication<\/code>. \u0422\u0430\u043a\u0436\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0436\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u0447\u0442\u043e <strong>Ripple <\/strong>\u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 <code>MaterialTheme<\/code>. \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u044c.<\/p>\n<pre><code class=\"kotlin\">@Composable fun MaterialTheme(   ... ) {     ...     val rippleIndication = rememberRipple()     CompositionLocalProvider(         LocalIndication provides rippleIndication,         LocalRippleTheme provides MaterialRippleTheme,         ...     ) {       ...     } } <\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 <code>LocalIndication<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>rememberRipple()<\/code>. <\/p>\n<p><code>rememberRipple()<\/code> \u2014 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>Compose Material Ripple<\/strong>. <\/p>\n<p>\u041f\u0440\u043e\u0432\u0430\u043b\u0438\u043c\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>Indication<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>PlatformRipple<\/code>. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439.<\/p>\n<p><code>PlatformRipple<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0448\u043b\u0438, \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a <code>actual<\/code>. <br \/>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0444\u0430\u0439\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f, \u0432 IDE \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <strong>Ripple.android.kt<\/strong>. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044f \u0442\u043e\u0433\u043e, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 <strong>Kotlin Multiplatform<\/strong>.<br \/>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u043e\u0434, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434 Android.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/p>\n<blockquote>\n<p>Android specific <strong>Ripple<\/strong> implementation that uses a <code>RippleDrawable<\/code> under the hood, which allows rendering the ripple animation on the <strong>render thread<\/strong> (away from the <strong>main<\/strong> <strong>UI thread<\/strong>). This allows the ripple to animate smoothly even while the UI thread is under heavy load, such as when navigating between complex screens.<\/p>\n<\/blockquote>\n<p>\u0418\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e <strong>Jetpack Compose<\/strong> \u043d\u0430 Android \u0434\u043b\u044f <strong>Ripple<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 <code>RippleDrawable<\/code> \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c*. \u0418 \u0432\u0441\u0435 \u043e\u0442\u0447\u0430\u0441\u0442\u0438 \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e <code>RippleDrawable<\/code> \u0443\u043c\u0435\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c <strong>Ripple<\/strong>-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u043d\u0435 \u043d\u0430 <strong>main thread<\/strong>, \u0430 \u043d\u0430 <strong>render thread<\/strong>.<\/p>\n<details class=\"spoiler\">\n<summary>*<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041a\u0430\u043a  \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u043e <code>RippleDrawable<\/code>\u0438\u0437 <code>PlatformRipple<\/code>?<\/p>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043c\u0435\u0442\u043e\u0434\u0443 <code>addRipple()<\/code>.<\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>addRipple()<\/code> \u043a\u043b\u0430\u0441\u0441\u0430 <code>RippleHostView<\/code>.<br \/>\u041f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0432 \u043d\u0435\u0433\u043e. <\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435 <strong>ripple<\/strong> \u043a\u043b\u0430\u0441\u0441\u0430 <code>UnprojectedRipple<\/code>.<br \/>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439.<\/p>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e <code>UnprojectedRipple<\/code> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u043c <code>RippleDrawable<\/code>.<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0437\u0430\u0434. <\/p>\n<p><code>PlatformRipple<\/code> \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 <code>Ripple<\/code>. <\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0442\u043e, \u043a\u0430\u043a <code>Ripple<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>Indication<\/code>. <br \/>(\u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>rememberUpdatedInstance<\/code>)<\/p>\n<pre><code class=\"kotlin\">@Stable internal abstract class Ripple(     ...     private val color: State&lt;Color> ) : Indication {     @Composable     final override fun rememberUpdatedInstance(         interactionSource: InteractionSource     ): IndicationInstance {         val theme = LocalRippleTheme.current         val color = rememberUpdatedState(             if (color.value.isSpecified) {                 color.value             } else {                 theme.defaultColor()             }         )         val rippleAlpha = rememberUpdatedState(theme.rippleAlpha())          val instance = rememberUpdatedRippleInstance(             ...             color,             rippleAlpha         )          ...     }      ... }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c-\u0442\u043e \u043c\u044b \u0438 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>Compose Material Ripple<\/strong>, \u0441 <code>RippleTheme<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>LocalRippleTheme<\/code>.<\/p>\n<p>\u041f\u043e \u043a\u043e\u0434\u0443 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e <code>RippleTheme<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <strong>rippleAlpha<\/strong> \u0438 <strong>defaultColor<\/strong> \u0434\u043b\u044f <strong>Ripple<\/strong>. \u041f\u0440\u0438\u0447\u0435\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0446\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Ripple <\/strong>\u043d\u0435 \u0431\u044b\u043b \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043d (\u0432 <code>rememberRipple()<\/code>).<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 <code>RippleTheme<\/code>.<\/p>\n<pre><code class=\"kotlin\">public interface RippleTheme {      @Composable     public fun defaultColor(): Color      @Composable     public fun rippleAlpha(): RippleAlpha }  @Immutable class RippleAlpha(     public val draggedAlpha: Float,     public val focusedAlpha: Float,     public val hoveredAlpha: Float,     public val pressedAlpha: Float )<\/code><\/pre>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043a\u043e\u0435-\u0447\u0442\u043e \u043f\u0440\u043e\u044f\u0441\u043d\u0438\u0442\u044c.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u0447\u0438\u0442\u0430\u043b \u0433\u0430\u0439\u0434\u043b\u0430\u0439\u043d\u044b \u0432 <strong>Material Design<\/strong> (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/m2.material.io\/design\/interaction\/states.html#usage\">\u044d\u0442\u043e\u0442<\/a>, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435), \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u0443\u043c\u043e\u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0447\u0442\u043e <strong>Ripple<\/strong> \u2014 \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 <strong>Overlay<\/strong> (<strong>State Layer<\/strong>).<\/p>\n<p>\u0421\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044f\u0441\u044c \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043b\u0438\u0446\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 <strong>Ripple<\/strong> \u0432 <strong>Compose<\/strong>, \u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435 \u0441 <code>rippleAlpha()<\/code> \u0432 <code>RippleTheme<\/code>, \u044f \u0432\u0438\u0436\u0443 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435: <code>rippleAlpha()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435 <code>Float<\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f <strong>Ripple<\/strong> (<strong>State Layer<\/strong> \u0434\u043b\u044f <strong>Pressed<\/strong>), \u0430 <code>RippleAlpha<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 <strong>State Layer<\/strong>&#8216;\u043e\u0432.   \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0438\u0437 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0435, \u0447\u0442\u043e <strong>Ripple <\/strong>\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e <strong>State Layer<\/strong>, \u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0447\u0430\u0441\u0442\u044c\u044e. \u041d\u0443 \u0438 \u044d\u0442\u043e \u043e\u0442\u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <code>rememberRipple()<\/code>:<\/p>\n<blockquote>\n<p>A Ripple responds to <code>PressInteraction.Press<\/code> by starting a new <code>RippleAnimation<\/code>, and responds to other <code>Interaction<\/code>s by showing a fixed <code>StateLayer<\/code> with varying alpha values depending on the <code>Interaction<\/code>.<\/p>\n<\/blockquote>\n<p>\u0412 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0443\u0442\u044c <code>RippleTheme<\/code> \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430. \u0412 \u043c\u043e\u0435\u043c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438 \u043e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0438 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 <strong>State Layer<\/strong>&#8216;\u043e\u0432 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f <strong>Ripple<\/strong>).<\/p>\n<p>\u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0434\u0435\u0442\u0430\u043b\u044c \u0432 <code>MaterialRippleTheme<\/code> (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 <code>LocalRippleTheme<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 <code>MaterialTheme<\/code> \u0434\u0432\u0443\u043c\u044f \u0431\u043b\u043e\u043a\u0430\u043c\u0438 \u043a\u043e\u0434\u0430 \u0440\u0430\u043d\u0435\u0435).<br \/>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>defaultColor()<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f <code>LocalContentColor.current<\/code>. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 (\u0442\u0438\u043f\u0430 \u0442\u0435\u043a\u0441\u0442 \u0438\u043b\u0438 \u0438\u043a\u043e\u043d\u043a\u0430), \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043d\u0438\u0445 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0446\u0432\u0435\u0442 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0438 \u0446\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Ripple<\/strong> \u043c\u0435\u043d\u044f\u043b\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435:<\/p>\n<pre><code class=\"kotlin\">@Composable fun Content() {     MaterialTheme {         CompositionLocalProvider(             LocalContentColor provides Color.Red         ) {             Text(                 modifier = Modifier.clickable { },                 text = \"Hello world!\"             )         }     } }<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ce4\/ab4\/59d\/ce4ab459db71b221fba7974a65a64ada.gif\" alt=\"Preview \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f LocalContentColor\" title=\"Preview \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f LocalContentColor\" width=\"618\" height=\"196\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ce4\/ab4\/59d\/ce4ab459db71b221fba7974a65a64ada.gif\"\/><\/p>\n<div><figcaption>Preview \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u0432\u0435\u0440\u0445\u0443 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u043b\u044f <code>LocalContentColor<\/code><\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u0442\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439, \u043d\u043e \u0432\u0430\u0436\u043d\u044b\u0439 <a href=\"https:\/\/developer.android.com\/reference\/kotlin\/androidx\/compose\/material\/ripple\/RippleAlpha\">\u043d\u044e\u0430\u043d\u0441<\/a>, \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0439\u0441\u044f \u043a <strong>pressedAlpha<\/strong> \u0432 <code>RippleAlpha.<\/code><\/p>\n<blockquote>\n<p>On Android, because the press ripple is drawn using the framework&#8217;s <code>RippleDrawable<\/code>, there are constraints \/ different behaviours for the actual press alpha used on different API versions. Note that this\u00a0<em>only<\/em>\u00a0affects\u00a0<code>pressedAlpha<\/code>\u00a0&#8212; the other values are guaranteed to be consistent, as they do not rely on framework code. Specifically:<\/p>\n<p>API 21-27: The actual ripple is split into two &#8216;layers&#8217;, with the alpha applied to both layers, so there is no uniform &#8216;alpha&#8217;. API 28-32: The ripple is just one layer, but the alpha is clamped to a maximum of 0.5f &#8212; it is not possible to have a fully opaque ripple. API 33: There is a bug where the ripple is clamped to a\u00a0<em>minimum<\/em>\u00a0of 0.5, instead of a maximum like before &#8212; this should be resolved in future versions.<\/p>\n<\/blockquote>\n<p>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c?<\/p>\n<ul>\n<li>\n<p><strong>Ripple<\/strong>-\u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u0434\u0432\u0443\u0445 &#171;\u0441\u043b\u043e\u0435\u0432&#187;.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 <strong>API level<\/strong> \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>pressedAlpha<\/strong> \u0440\u0430\u0432\u043d\u043e 0.5.<\/p>\n<\/li>\n<\/ul>\n<h3>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 API level<\/h3>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f <strong>Ripple<\/strong> \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 <strong>API level<\/strong>. <br \/>\u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043e\u043f\u044b\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442.<br \/>\u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0430\u043a\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044c &#171;alpha=XXX&#187; \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <strong>alpha<\/strong> \u043f\u043e\u0434 <strong>Ripple<\/strong>.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0445\u043e\u0442\u044c <code>RippleAlpha<\/code> \u0438 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 <strong>alpha<\/strong> \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 <code>Interaction<\/code>&#8216;\u043e\u0432, \u043d\u0430\u043c \u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0443\u0447\u0430\u0439 \u0441 <strong>pressedAlpha<\/strong>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e, \u0430 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043d\u0443\u043b\u044f\u0435\u043c.<\/p>\n<p>\u0421\u043b\u0435\u0432\u0430 \u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e &#171;start&#187;.<br \/>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0435\u043b\u044b\u0439 \u0446\u0432\u0435\u0442.<\/p>\n<p>\u0421\u043f\u0440\u0430\u0432\u0430 \u2014 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e &#171;final&#187;. <br \/>\u042d\u0442\u043e\u0442 \u0446\u0432\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c <strong>Ripple <\/strong>(<strong>Overlay<\/strong>) \u043d\u0430 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0446\u0432\u0435\u0442.<\/p>\n<p>\u0412\u0441\u0435 \u0442\u0430\u043a\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435, \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0440\u0430\u0432\u0435\u043d \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0446\u0432\u0435\u0442\u0443 \u043f\u0440\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u043c (\u043f\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 <strong>alpha=0.5<\/strong>.<br \/>\u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u0430 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441 <strong>alpha>0.5<\/strong> \u0438 \u0441 <strong>alpha=0.5<\/strong>.<\/p>\n<p>\u0412 \u043e\u043f\u044b\u0442\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 <strong>\u0434\u0432\u0430<\/strong> <strong>\u0446\u0432\u0435\u0442\u0430<\/strong> \u0438 \u043f\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 <strong>alpha<\/strong> (\u043e\u0442 0.0 \u0434\u043e 1.0 \u0441 \u0448\u0430\u0433\u043e\u043c 0.25).<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/C5FR7Q\/RippleMaterial2\/blob\/master\/app\/src\/main\/java\/com\/example\/ripplematerial2\/Content.kt\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/449\/b8c\/a53\/449b8ca53c2eb170be1cbdb27faec7ae.gif\" alt=\"API level 21\" title=\"API level 21\" width=\"710\" height=\"224\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/449\/b8c\/a53\/449b8ca53c2eb170be1cbdb27faec7ae.gif\"\/><\/p>\n<div><figcaption>API level 21<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0438\u0448\u0443\u0442 \u043f\u0440\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0435\u0432 \u043f\u043e\u0434 <strong>Ripple<\/strong> \u0434\u043b\u044f <strong>API level &lt; 28<\/strong>.<br \/>\u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0434 \u044d\u0442\u0438\u043c \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442.<\/p>\n<p>\u041d\u0430 <strong>API level 21<\/strong> \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0439 <strong>Overlay<\/strong>, \u043f\u043e \u0446\u0432\u0435\u0442\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443.<\/p>\n<p>\u041f\u043e\u0432\u0435\u0440\u0445 \u043f\u0435\u0440\u0432\u043e\u0433\u043e <strong>Overlay<\/strong> \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0435\u0439 &#171;\u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430&#187;, \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0434\u043b\u044f <strong>Ripple<\/strong>.<\/p>\n<p>\u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e.<br \/>\u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432 \u044d\u0442\u043e\u043c \u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u043a\u0430\u043a \u0434\u0432\u0430 \u0441\u043b\u043e\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c06\/689\/e72\/c06689e728ad027217ee621bcb9c3430.gif\" alt=\"API level 26\" title=\"API level 26\" width=\"710\" height=\"224\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c06\/689\/e72\/c06689e728ad027217ee621bcb9c3430.gif\"\/><\/p>\n<div><figcaption>API level 26<\/figcaption><\/div>\n<\/figure>\n<p><strong>API level 26<\/strong> \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e.<\/p>\n<p>\u0422\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u043c <strong>Overlay <\/strong>\u0432 <strong>API level 26<\/strong>, \u0442\u0435\u043f\u0435\u0440\u044c \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <strong>fade<\/strong>.<\/p>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c. <br \/>\u041d\u043e \u043d\u0435\u043d\u0430\u0434\u043e\u043b\u0433\u043e.<br \/>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u043a\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 <strong>Ovelay<\/strong> c \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u043e\u0439 \u0434\u043b\u044f <strong>Ripple<\/strong> \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0435\u0439.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cff\/5b0\/d04\/cff5b0d043193fc5e529fb232a8d5717.gif\" alt=\"API level 30\" title=\"API level 30\" width=\"710\" height=\"224\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cff\/5b0\/d04\/cff5b0d043193fc5e529fb232a8d5717.gif\"\/><\/p>\n<div><figcaption>API level 30<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u043e <strong>API level 30<\/strong> \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u0435.<\/p>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0439 <strong>Overlay<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0446\u0432\u0435\u0442\u0443 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/823\/8fd\/40a\/8238fd40a1ad271f99082c0b1cca13db.gif\" alt=\"API level 32\" title=\"API level 32\" width=\"744\" height=\"224\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/823\/8fd\/40a\/8238fd40a1ad271f99082c0b1cca13db.gif\"\/><\/p>\n<div><figcaption>API level 32<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0443, \u0438 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u2014 <strong>API level 32<\/strong>.<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 <strong>Ripple<\/strong> (<strong>Overlay<\/strong>) \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0435 \u0432\u0435\u0441\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442: \u0443\u0433\u043b\u044b \u0441\u0432\u0435\u0442\u043b\u0435\u0435, \u0447\u0435\u043c \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0430. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e <strong>Ripple<\/strong> \u043f\u043e\u0442\u0435\u0440\u044f\u043b \u0441\u0432\u043e\u0438 \u0447\u0435\u0442\u043a\u0438\u0435 \u0433\u0440\u0430\u043d\u0438\u0446\u044b: \u0440\u0430\u043d\u044c\u0448\u0435 \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043a\u0440\u0443\u0433 \u0431\u044b\u043b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0434\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u0442.<\/p>\n<p>\u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0434\u0430\u043b\u0435\u043a \u043e\u0442 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e.<br \/>\u041d\u043e \u0442\u0430\u043a \u043b\u0438 \u044d\u0442\u043e?<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/707\/d31\/3a1\/707d313a14379ce294ca8a1b65999b98.gif\" alt=\"API level 32 (\u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e)\" title=\"API level 32 (\u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e)\" width=\"744\" height=\"224\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/707\/d31\/3a1\/707d313a14379ce294ca8a1b65999b98.gif\"\/><\/p>\n<div><figcaption>API level 32 (\u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e)<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u0438 \u0437\u0430\u043c\u0435\u0434\u043b\u0435\u043d\u0438\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0446\u0432\u0435\u0442 \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0434\u0438\u0438 \u0441\u0432\u0435\u0442\u043b\u0435\u0435, \u0447\u0435\u043c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u0431\u0430\u0433.<\/p>\n<p>\u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0446\u0432\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435, \u0440\u0430\u0432\u0435\u043d \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0433\u043b\u044f\u0434\u0435\u0442\u044c\u0441\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u0430\u043a \u0431\u0443\u0434\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442 \u0448\u0443\u043c\u0430 \u043d\u0430 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6ce\/79d\/9dc\/6ce79d9dc0f55390ec3f991c3cef53f5.gif\" alt=\"\u0428\u0443\u043c \u043f\u0440\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 Ripple\" title=\"\u0428\u0443\u043c \u043f\u0440\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 Ripple\" width=\"754\" height=\"230\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6ce\/79d\/9dc\/6ce79d9dc0f55390ec3f991c3cef53f5.gif\"\/><\/p>\n<div><figcaption>\u0428\u0443\u043c \u043f\u0440\u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 Ripple \u043d\u0430 API level 32<\/figcaption><\/div>\n<\/figure>\n<p>\u0418 \u043e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f. \u041f\u0440\u0430\u0432\u0434\u0430, \u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043b\u0438\u043a\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445.<\/p>\n<p>\u041c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0436\u0435 \u0442\u0430\u043a \u0432\u0441\u0435 \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c.<\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u0438 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 Android 12 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u0438 <strong>Sparkle Ripple<\/strong>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/www.phonearena.com\/news\/Android-12-ripple-sparkle-effect-buttons_id132420\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u0415\u0433\u043e, \u043f\u0440\u0430\u0432\u0434\u0430, \u0432\u044b\u043f\u0438\u043b\u0438\u043b\u0438 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u043e\u0442\u0437\u044b\u0432\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 (\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0433\u0443\u0433\u043b\u044f\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 &#171;reddit sparkle ripple&#187;).<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u0446\u0432\u0435\u0442\u043e\u043c \u0443\u0436\u0435 <a href=\"https:\/\/www.reddit.com\/r\/android_beta\/comments\/nj3007\/unexpected_sparkle_ripple_color_on_toolbar_and\/\">\u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u0430\u0441\u044c<\/a> \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 Reddit&#8217;e.<\/p>\n<h2>\u041f\u0438\u043a\u0430\u0435\u043c Ripple \u0438\u0437 Figma<\/h2>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0441\u0442\u0430\u0442\u044c\u0438. <\/p>\n<p>&#171;\u041a\u0430\u043a\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 <strong>Ripple<\/strong>?&#187;<\/p>\n<p>\u042d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0435 \u043a\u043b\u0438\u043a\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0434\u0438\u0437\u0430\u0439\u043d\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 <strong>Figma<\/strong>).<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438.<\/p>\n<h3>Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/559\/d6a\/ca2\/559d6aca217873b9cac745eae3e660cc.png\" alt=\"\u041a\u043d\u043e\u043f\u043a\u0430 \u0431\u0435\u0437 Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\" title=\"\u041a\u043d\u043e\u043f\u043a\u0430 \u0431\u0435\u0437 Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\" width=\"991\" height=\"806\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/559\/d6a\/ca2\/559d6aca217873b9cac745eae3e660cc.png\"\/><\/p>\n<div><figcaption>\u041a\u043d\u043e\u043f\u043a\u0430 \u0431\u0435\u0437 <strong>Pressed<\/strong> \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 <strong>Pressed<\/strong> \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0438 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432 \u0446\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Ripple<\/strong> \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (<em>onContainer<\/em> \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430). \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c <strong>Ripple<\/strong> \u043a\u0430\u043a \u043f\u043e \u0433\u0430\u0439\u0434\u043b\u0430\u0439\u043d\u0430\u043c, \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d <strong>Pressed<\/strong> \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b:<\/p>\n<ol>\n<li>\n<p>\u0413\u0430\u0439\u0434\u043b\u0430\u0439\u043d\u044b (\u0434\u043b\u044f <a href=\"https:\/\/m2.material.io\/design\/interaction\/states.html#anatomy\">Material Design 2<\/a> \/ \u0434\u043b\u044f <a href=\"https:\/\/m3.material.io\/foundations\/interaction\/states\/state-layers\">Material Design 3<\/a>).<\/p>\n<\/li>\n<li>\n<p><strong>Ripple<\/strong> \u2014 \u044d\u0442\u043e <strong>Overlay<\/strong> (\u0438\u043b\u0438 <strong>State Layer<\/strong>).<\/p>\n<\/li>\n<li>\n<p><strong>Overlay<\/strong> \u2014 \u044d\u0442\u043e \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0426\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Overlay<\/strong> \u0440\u0430\u0432\u0435\u043d \u0446\u0432\u0435\u0442\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f <strong>Overlay<\/strong> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 50%.<\/p>\n<\/li>\n<li>\n<p><strong>Ripple<\/strong> \u2014 \u0448\u0442\u0443\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f, \u043c\u043e\u0436\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0435\u0432\u0430\u0439\u0441\u0430\u0445.<\/p>\n<\/li>\n<\/ol>\n<h3>Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 Overlay<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/34d\/beb\/89e\/34dbeb89e95f2c6653bb91be3f746f78.png\" alt=\"\u041a\u043d\u043e\u043f\u043a\u0430 \u0441 Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 Overlay\" title=\"\u041a\u043d\u043e\u043f\u043a\u0430 \u0441 Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 Overlay\" width=\"990\" height=\"404\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/34d\/beb\/89e\/34dbeb89e95f2c6653bb91be3f746f78.png\"\/><\/p>\n<div><figcaption>\u041a\u043d\u043e\u043f\u043a\u0430 \u0441 <strong>Pressed<\/strong> \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 <strong>Overlay<\/strong><\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u043b\u0430\u0433\u043e\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043a\u043e\u0433\u0434\u0430 \u0432 <strong>Figma<\/strong> \u0435\u0441\u0442\u044c <strong>Pressed<\/strong> \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438, \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u043e\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u043b\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0441\u0435\u0433\u043e.<\/p>\n<p>\u0421\u043b\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043a\u0440\u0443\u0436\u043e\u043a, \u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442. \u0422\u043e\u0433\u0434\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0441\u0443\u0442\u044c \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0444\u043e\u0440\u043c\u044b \u0434\u043b\u044f <strong>Overlay<\/strong>.<\/p>\n<p>\u0426\u0432\u0435\u0442 \u0438 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043a\u043e\u0434\u0435, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0432\u044b\u0434\u0435\u043b\u0438\u0432 <strong>Overlay,<\/strong> \u0443\u0432\u0438\u0434\u0438\u043c \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0438 \u0446\u0432\u0435\u0442.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u044f\u043c\u0438, \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0448\u0435 50%. \u0418\u043b\u0438 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043b\u0435\u0436\u0438\u0442 \u043f\u043e\u0432\u0435\u0440\u0445 <strong>Overlay<\/strong>. \u0422\u043e\u0433\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d \u0441 \u043f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u0432, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0440\u0430\u043d\u0435\u0435 \u0434\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u0431\u0435\u0437 <strong>Pressed<\/strong> \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f.<\/p>\n<h3>Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430<\/h3>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9db\/a55\/1c6\/9dba551c6897ac1a72be0585e06f981f.png\" alt=\"\u041a\u043d\u043e\u043f\u043a\u0430 \u0441 Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0446\u0432\u0435\u0442\" title=\"\u041a\u043d\u043e\u043f\u043a\u0430 \u0441 Pressed \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0446\u0432\u0435\u0442\" width=\"990\" height=\"404\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9db\/a55\/1c6\/9dba551c6897ac1a72be0585e06f981f.png\"\/><\/p>\n<div><figcaption>\u041a\u043d\u043e\u043f\u043a\u0430 \u0441 <strong>Pressed<\/strong> \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0446\u0432\u0435\u0442<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0443 \u0438 \u0441\u0430\u043c\u044b\u0439 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439. \u0421\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c <strong>Pressed<\/strong> \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043e\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0446\u0432\u0435\u0442.<\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u044d\u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439, \u043e\u0434\u043d\u0430\u043a\u043e \u0438\u043c\u0435\u0435\u0442 \u043f\u0430\u0440\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 <strong>Overlay<\/strong> (\u0438, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f <strong>Overlay<\/strong> \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f).<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u044f\u0441\u043d\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u043a\u0443 \u0446\u0432\u0435\u0442 + \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f <strong>Ripple.<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0438 \u043b\u0443\u0447\u0448\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0443. <\/p>\n<p>\u0410 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0443 \u0446\u0432\u0435\u0442 + \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f <strong>Ripple<\/strong> \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435? \u0412\u043e\u043f\u0440\u043e\u0441 &#171;\u041a\u0430\u043a\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 <strong>Ripple<\/strong>?&#187; \u0432\u043e\u0437\u043d\u0438\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0442\u0441\u044e\u0434\u0430.<\/p>\n<h4>\u041c\u0430\u0433\u0438\u044f<\/h4>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0446\u0432\u0435\u0442\u0430: <em>container<\/em> \u0438 <em>containerPressed<\/em>.<\/p>\n<p>\u041c\u044b \u0436\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0440\u0435\u0442\u0438\u0439. \u0422\u0430\u043a\u043e\u0439, \u043f\u0440\u0438 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0430 <em>container<\/em> \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0441\u044f \u0431\u044b <em>containerPressed<\/em>.<\/p>\n<p>\u0412 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u043c\u043e\u0433 \u0432\u043e\u043f\u0440\u043e\u0441 <a href=\"https:\/\/stackoverflow.com\/questions\/12228548\/finding-equivalent-color-with-opacity\">Finding &#171;equivalent&#187; color with opacity<\/a>.<\/p>\n<p>\u0426\u0432\u0435\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"formula\" source=\"x_{overlay}= x_{default}+\\frac{x_{pressed}-x_{default}}{A_{overlay}}\" alt=\"x_{overlay}= x_{default}+\\frac{x_{pressed}-x_{default}}{A_{overlay}}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1b1\/92f\/5bd\/1b192f5bd238cae5dc03b56e4340322a.svg\" width=\"316\" height=\"49\"\/><\/p>\n<p>\u0433\u0434\u0435<br \/><strong>x<\/strong> \u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0439 <strong>RGB<\/strong> \u0446\u0432\u0435\u0442\u0430 (<strong>R<\/strong>ed, <strong>G<\/strong>reen \u0438\u043b\u0438 <strong>B<\/strong>lue);<br \/><strong>A <\/strong>\u2014 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438 (\u043e\u043d\u0430 \u0436\u0435 <strong>alpha<\/strong>).<\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/73e\/5d6\/07b\/73e5d607b233d92b6278ac489de39f32.png\" alt=\"\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f Overlay: \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u043e\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u044b\u0439 \u043f\u043e\u0442\u0435\u043c\u043d\u0435\u0435\" title=\"\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f Overlay: \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u043e\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u044b\u0439 \u043f\u043e\u0442\u0435\u043c\u043d\u0435\u0435\" width=\"1728\" height=\"668\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/73e\/5d6\/07b\/73e5d607b233d92b6278ac489de39f32.png\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Overlay<\/strong>: \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u043e\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u044b\u0439 \u043f\u043e\u0442\u0435\u043c\u043d\u0435\u0435<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432 <strong>Input<\/strong>:<em><br \/><\/em>\u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0446\u0432\u0435\u0442,<em> container<\/em>, \u2014 <em>#D9D9D9 <\/em>(\u0438\u043b\u0438 <strong>R<\/strong>ed=217, <strong>G<\/strong>reen=217, <strong>B<\/strong>lue=217). <br \/>\u043d\u0438\u0436\u043d\u0438\u0439 \u0446\u0432\u0435\u0442, <em>pressedContainer<\/em>, \u2014 <em>#AEAEAE<\/em> (174, 174, 174).<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <strong>Result<\/strong> \u0431\u043b\u043e\u043a\u0438.<br \/>\u0412 \u043d\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 <strong>alpha<\/strong>:<\/p>\n<ul>\n<li>\n<p>\u0435\u0441\u043b\u0438 <em>alpha=0.20<\/em>, \u0442\u043e \u0446\u0432\u0435\u0442\u0443 \u0434\u043b\u044f <strong>Overlay<\/strong> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 <em>#020202<\/em> (02, 02, 02);<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 <em>alpha=0.35<\/em>, \u0442\u043e \u0446\u0432\u0435\u0442\u0443 \u0434\u043b\u044f <strong>Overlay<\/strong> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 <em>#5E5E5E<\/em> (94, 94, 94);<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 <em>alpha=0.50<\/em>, \u0442\u043e \u0446\u0432\u0435\u0442\u0443 \u0434\u043b\u044f <strong>Overlay<\/strong> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 <em>#838383<\/em> (131, 131, 131).<\/p>\n<\/li>\n<\/ul>\n<p>\u0426\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u0440\u0438 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e <strong>Overlay<\/strong> \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435 \u0441\u0435\u0440\u044b\u043c \u0441 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f <strong>alpha<\/strong> (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0434\u0432\u0443\u043c\u044f \u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438).<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441 <strong>alpha>0.5 <\/strong>\u043f\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f (<strong>Ripple<\/strong> \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0430 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0430 <strong>alpha=0.5<\/strong>).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/211\/bfc\/358\/211bfc3583ab3baa58def9ebe5d87ed1.png\" alt=\"\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f Overlay: \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u0435\u0433\u043e \u0432 \u0441\u0438\u043d\u0438\u0439 \u043f\u043e\u0441\u0432\u0435\u0442\u043b\u0435\u0435\" title=\"\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f Overlay: \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u0435\u0433\u043e \u0432 \u0441\u0438\u043d\u0438\u0439 \u043f\u043e\u0441\u0432\u0435\u0442\u043b\u0435\u0435\" width=\"1728\" height=\"668\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/211\/bfc\/358\/211bfc3583ab3baa58def9ebe5d87ed1.png\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Overlay<\/strong>: \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0438\u043d\u0435\u0433\u043e \u0432 \u0441\u0438\u043d\u0438\u0439 \u043f\u043e\u0441\u0432\u0435\u0442\u043b\u0435\u0435<\/figcaption><\/div>\n<\/figure>\n<p><em>container<\/em> \u0446\u0432\u0435\u0442 \u2014 <em>#436EDE <\/em>(67, 110, 222). <br \/><em>pressedContainer<\/em> \u0446\u0432\u0435\u0442 \u2014 <em>#7D9FF8<\/em> (125, 159, 248).<\/p>\n<p>\u0421\u043d\u043e\u0432\u0430 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u0446\u0432\u0435\u0442\u043e\u0432 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u043a\u0440\u0430\u0441\u043d\u044b\u043c.<br \/>\u041e\u043d\u0438 \u043b\u0435\u0436\u0430\u0442 \u0432\u043d\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 [0, 255] \u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c.<\/p>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e <strong>Result<\/strong> \u0431\u043b\u043e\u043a\u0430 \u043d\u0430\u0434 &#171;Overlay alpha&#8230;&#187; \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441 \u0434\u0432\u0443\u043c\u044f \u0446\u0432\u0435\u0442\u0430\u043c\u0438: \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043b\u0435\u0432\u0430 \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043f\u0440\u0430\u0432\u0430.<\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0446\u0432\u0435\u0442\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f.<br \/>\u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430.<br \/>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0446\u0432\u0435\u0442\u0430 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/238\/742\/5e4\/2387425e4f3d024b43fddc0f9adee17b.png\" alt=\"\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f Overlay: \u0438\u0437 \u0441\u0438\u043d\u0435\u0433\u043e \u0432 \u043a\u0440\u0430\u0441\u043d\u044b\u0439\" title=\"\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f Overlay: \u0438\u0437 \u0441\u0438\u043d\u0435\u0433\u043e \u0432 \u043a\u0440\u0430\u0441\u043d\u044b\u0439\" width=\"1728\" height=\"668\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/238\/742\/5e4\/2387425e4f3d024b43fddc0f9adee17b.png\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0446\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Overlay<\/strong>: \u0438\u0437 \u0441\u0438\u043d\u0435\u0433\u043e \u0432 \u043a\u0440\u0430\u0441\u043d\u044b\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c \u0446\u0432\u0435\u0442\u043e\u0432 \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0432 \u043d\u043e\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:<br \/><em>container<\/em> \u0446\u0432\u0435\u0442 \u2014 <em>#436EDE <\/em>(67, 110, 222). <br \/><em>pressedContainer<\/em> \u0446\u0432\u0435\u0442 \u2014 <em>#FF0000<\/em> (255, 0, 0).<\/p>\n<p>\u0414\u0430\u0436\u0435 \u043f\u0440\u0438 <strong>alpha=0.5<\/strong> \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0446\u0432\u0435\u0442 \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e.<\/p>\n<p>\u0412\u0441\u0435 \u0442\u0440\u0438 \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432 <strong>Figma<\/strong> (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e) \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u043e <a href=\"https:\/\/www.figma.com\/file\/5HiD4qznCWAMIREqUqTsY5\/Ripple?type=design&amp;node-id=0%3A1&amp;t=EykkXl7OCzrWowvT-1\">\u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043d\u0430 <strong>Compose<\/strong> (\u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0446\u0432\u0435\u0442) \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/C5FR7Q\/RippleMaterial2\/blob\/ea680585abb8c99a1cec2e3e8b283664d723ce46\/app\/src\/main\/java\/com\/example\/ripplematerial2\/Color.kt#LL22C6-L22C6\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ff\/28f\/82a\/7ff28f82a0558fd512d7357a0f70cbd0.gif\" alt=\"Preview \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" title=\"Preview \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430\" width=\"706\" height=\"264\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ff\/28f\/82a\/7ff28f82a0558fd512d7357a0f70cbd0.gif\"\/><\/p>\n<div><figcaption>Preview \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><strong>Ripple<\/strong> \u2014 \u044d\u0442\u043e <strong>Overlay<\/strong> \u043f\u043e\u0432\u0435\u0440\u0445 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0426\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Ripple <\/strong>\u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0440\u0430\u0432\u0435\u043d \u0446\u0432\u0435\u0442\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f <strong>Ripple<\/strong> \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 50%.<\/p>\n<\/li>\n<li>\n<p><strong>Ripple<\/strong> \u2014 \u044d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e, \u043e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 <strong>API level.<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u043e\u0432 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <strong>Ripple<\/strong> \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u0441\u0435\u0445 \u043d\u044e\u0430\u043d\u0441\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u0430 <strong>Ripple<\/strong>? \u041e\u043d \u0440\u0430\u0437\u043d\u044b\u0439&#8230;<\/p>\n<\/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\/companies\/leroy_merlin\/articles\/735288\/\"> https:\/\/habr.com\/ru\/companies\/leroy_merlin\/articles\/735288\/<\/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<figure class=\"full-width\"><\/figure>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u043e\u0437\u043d\u0438\u043a \u0443 \u043c\u0435\u043d\u044f \u043e\u0434\u043d\u0430\u0436\u0434\u044b. \u0410 \u043f\u043e\u0442\u043e\u043c \u0435\u0449\u0435 \u0440\u0430\u0437. \u0418 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f.<br \/>\u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442. \u0417\u0430\u0442\u043e \u0435\u0441\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0431\u0435\u0437 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0431\u0443\u0434\u0435\u0442. \u041d\u043e \u043d\u0435 \u0441\u0440\u0430\u0437\u0443. <br \/>\u041e\u0431\u043e \u0432\u0441\u0435\u043c \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<h2>\u0427\u0442\u043e \u0435\u0441\u0442\u044c Ripple<\/h2>\n<p><strong>Ripple effect <\/strong>\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a\u0430\u043a &#171;\u0432\u043e\u043b\u043d\u043e\u0432\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442&#187;. <br \/>\u0417\u0430\u0431\u0430\u0432\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u044f \u0443\u0437\u043d\u0430\u043b \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u044c\u0438, \u0445\u043e\u0442\u044f \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u0430\u0432\u043d\u043e. <\/p>\n<p><strong>Ripple <\/strong>\u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0430\u0441\u0441\u043e\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u043c &#171;\u0432\u043e\u043b\u043d\u043e\u0432\u044b\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c&#187;, \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u043c \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u0432 Android.<\/p>\n<p>\u0417\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 <a href=\"https:\/\/developer.android.com\/reference\/android\/graphics\/drawable\/RippleDrawable\">RippleDrawable<\/a>. \u041e\u043d \u0438 \u0432\u0435\u0434\u0435\u0442 \u043a \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0442\u0435\u0440\u043c\u0438\u043d\u0430:<\/p>\n<blockquote>\n<p>Drawable that shows a ripple effect in response to <strong>state <\/strong>changes.<\/p>\n<\/blockquote>\n<p><strong>Ripple<\/strong> \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 Android Lollipop. \u0417\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0435\u0449\u0435? <strong>Material Design<\/strong>. <\/p>\n<h2>Ripple &amp; Material Design 2<\/h2>\n<p>\u041f\u0440\u0438\u0447\u0435\u043c \u0437\u0434\u0435\u0441\u044c <strong>Material Design<\/strong>? \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <a href=\"https:\/\/m2.material.io\/design\/interaction\/states.html\">\u0442\u0430\u043c<\/a> \u0434\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043d\u044f\u0442\u0438\u044f <strong>State<\/strong>*.<\/p>\n<details class=\"spoiler\">\n<summary>*<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042d\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 <strong>State<\/strong> \u0432 <strong>RippleDrawable<\/strong>, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e \u043d\u0435\u0433\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e<\/p>\n<ul>\n<li>\n<p><strong>Material Design<\/strong> \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u0430 <strong>RippleDrawable<\/strong> \u2014 \u0447\u0430\u0441\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c <strong>Material Design<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <strong>RippleDrawable.<\/strong><\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u043f\u0440\u043e <strong>Jetpack Compose<\/strong>, \u0430 \u0442\u0430\u043c <strong>Ripple<\/strong> \u2014 \u0447\u0430\u0441\u0442\u044c <strong>Material Design.<\/strong><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<blockquote>\n<p>States are visual representations used to communicate the status of a component or interactive element.<\/p>\n<\/blockquote>\n<p><strong>State<\/strong> \u2014 \u044d\u0442\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u041f\u0440\u0438\u043c\u0435\u0440 \u2014 pressed, focused.<\/p>\n<p>\u0412\u0441\u0435\u0433\u043e \u0435\u0441\u0442\u044c 11 \u0442\u0438\u043f\u043e\u0432 \u043f\u043e\u0434 <strong>State<\/strong>, \u0447\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. <br \/>\u041a\u0443\u0434\u0430 \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0442\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 (\u0442\u0438\u043f\u0430 pressed).<\/p>\n<p>\u0417\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f, <a href=\"https:\/\/m2.material.io\/design\/interaction\/states.html#anatomy\">Overlay<\/a>.<\/p>\n<blockquote>\n<p>An overlay is a semi-transparent covering on an element that indicates its state.<\/p>\n<\/blockquote>\n<p>\u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c (\u0430 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u043d \u043f\u043e\u0442\u043e\u043c).<br \/>\u0427\u0442\u043e \u0435\u0441\u0442\u044c <em>covering<\/em>? \u042d\u0442\u043e \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0432\u0435\u0440\u0445\u0443.<\/p>\n<p><strong>Overlay<\/strong> \u2014 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u0438 <strong>State<\/strong>&#8216;a.<\/p>\n<p><strong>Ripple<\/strong> \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 <strong>Overlay<\/strong>.<\/p>\n<p>\u0426\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Overlay<\/strong> \u0432 \u0438\u0434\u0435\u0430\u043b\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0446\u0432\u0435\u0442\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<br \/>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<ul>\n<li>\n<p>\u041d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u2014 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430<\/p>\n<\/li>\n<li>\n<p>\u0426\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u2014 <em>primary<\/em><\/p>\n<\/li>\n<li>\n<p>\u0426\u0432\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0435 \u2014 <em>onPrimary<\/em><\/p>\n<\/li>\n<li>\n<p>\u0426\u0432\u0435\u0442 \u0434\u043b\u044f <strong>Overlay<\/strong> \u2014 <em>onPrimary<\/em><\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f <strong>Overlay<\/strong>, \u043e\u0434\u043d\u0430\u043a\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441 20%-\u0439 \u043d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434 <strong>Overlay<\/strong><\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0441 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441 <strong>Pressed State<\/strong> \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u043c <strong>Ripple<\/strong> (<strong>Overlay<\/strong>). \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u0440\u0430\u0432\u0443\u044e \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0443, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e, <strong>Overlay <\/strong>\u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043d\u0438\u0436\u043d\u0438\u0439 \u0433\u0440\u0430\u0444\u0438\u043a \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u0442\u0435\u043c\u043d\u044f\u0435\u0442 \u0435\u0433\u043e (\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>covering<\/em>).<\/p>\n<figure class=\"full-width\">\n<div><figcaption><strong>Pressed State<\/strong> \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0439 <strong>Overlay<\/strong><\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c <strong>Ripple<\/strong> \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 <strong>Material Design<\/strong>, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u043f\u043e\u0434 <a href=\"https:\/\/m2.material.io\/develop\/ios\/supporting\/ripple\">iOS<\/a> \u0438 <a href=\"https:\/\/m2.material.io\/develop\/web\/supporting\/ripple\">Web<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e \u043d\u0438\u0445 \u043d\u0438\u0447\u0435\u0433\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0435 \u043c\u043e\u0433\u0443.<\/p>\n<h2>Ripple &amp; Material Design 3<\/h2>\n<p>\u0412 <a href=\"https:\/\/m3.material.io\/foundations\/interaction\/states\/overview\">Material Design 3<\/a> \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441\u044b.<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e <strong>State<\/strong>&#8216;\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>Overlay<\/strong> \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043b\u0438 \u0432 <strong>State Layer.<\/strong><\/p>\n<\/li>\n<\/ul>\n<p>\u0410 \u0435\u0449\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u0442, \u0447\u0442\u043e <strong>\u043a\u043e\u043d\u0442\u0435\u043d\u0442<\/strong> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0434 <strong>State Layer<\/strong>, \u043d\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0436\u0435 \u043c\u0435\u0441\u0442\u0435 \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0432\u044b\u043c \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f. <\/p>\n<figure class=\"full-width\">\n<div><figcaption><strong>\u041a\u043e\u043d\u0442\u0435\u043d\u0442<\/strong> \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0434 <strong>State Layer<\/strong>???<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>.\u0412\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e, \u0447\u0442\u043e <strong>State Layer <\/strong>\u0437\u0430\u0442\u0435\u043c\u043d\u044f\u0435\u0442 \u0446\u0432\u0435\u0442 <strong>\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 <\/strong>(\u0442\u0435\u043a\u0441\u0442\u0430), \u0438\u0437 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e <strong>State Layer<\/strong> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0434 <strong>\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c<\/strong><\/figcaption><\/div>\n<\/figure>\n<h2>Ripple &amp; XML<\/h2>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0435\u0449\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <strong>Material Design<\/strong>, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 <strong>Ripple<\/strong> \u0432 <strong>XML<\/strong> \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c:<\/p>\n<ol>\n<li>\n<p>\u0412 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>android:foreground<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0441\u044f <code>?selectableItemBackground<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>android:clickable<\/code>, \u0440\u0430\u0432\u043d\u044b\u0439 <code>true<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e <strong>Ripple<\/strong> \u0432 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u044f\u0445 (\u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u043e \u0432\u0441\u0435\u0445) \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e \u043a\u0443\u0447\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>android:focusable<\/code> \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>true<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 <strong>clickable<\/strong> \u0431\u0435\u0437 <strong>focusable<\/strong> \u0440\u0443\u0433\u0430\u043b\u0441\u044f Lint.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"xml\">&lt;... android:foreground = \"?selectableItemBackground\" android:clickable = \"true\" android:focusable = \"true\" \/> <\/code><\/pre>\n<p>\u0412\u0441\u0435? \u0418 \u0434\u0430, \u0438 \u043d\u0435\u0442.<\/p>\n<ul>\n<li>\n<p><code>android:foreground<\/code>  \u0434\u043e <strong>API level 23<\/strong> \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 <a href=\"https:\/\/stackoverflow.com\/questions\/52329249\/why-doesnt-androidforeground-attribute-work\">\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b<\/a> \u043d\u0438 \u043d\u0430 \u0447\u0435\u043c, \u043a\u0440\u043e\u043c\u0435 <strong>FrameLayout<\/strong>. \u0415\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u044f\u043b\u0438 \u043d\u0430 <code>android:background<\/code>, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u043d\u0435 <strong>overlay<\/strong>, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e <strong>background.<\/strong><\/p>\n<\/li>\n<li>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0430\u043d\u0446\u044b \u0441 \u0431\u0443\u0431\u043d\u043e\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f <a href=\"https:\/\/stackoverflow.com\/questions\/33061050\/how-can-i-modify-ripple-color-when-using-attr-selectableitembackground-as-backg\">\u0437\u0430\u043c\u0435\u043d\u044b \u0446\u0432\u0435\u0442\u0430<\/a> \u0443 <strong>Ripple<\/strong>. \u041d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <strong>ThemeOverlay<\/strong>, \u0432 \u043d\u0435\u043c \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c <code>android:colorControlHighlight<\/code> \u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 <strong>ThemeOverlay<\/strong> \u0447\u0435\u0440\u0435\u0437 <code>android:theme<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 <strong>Ripple<\/strong> \u043d\u0430 \u0431\u0430\u0437\u0435 <strong>RippleDrawable<\/strong> \u0438 \u043d\u0435 \u043c\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0441 \u0446\u0432\u0435\u0442\u0430\u043c\u0438.<\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e, \u0432\u0441\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/developer.android.com\/training\/material\/animations\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>\u041d\u0430 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 <strong>Material Design<\/strong> \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u0427\u0442\u043e \u0434\u043e <strong>Material Design<\/strong>, \u0432 \u043d\u0435\u043c \u0435\u0441\u0442\u044c <a href=\"https:\/\/developer.android.com\/reference\/com\/google\/android\/material\/card\/MaterialCardView#attr_MaterialCardView_rippleColor\">MaterialCardView<\/a>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0446\u0432\u0435\u0442 <strong>Ripple<\/strong> \u043f\u043e\u0434\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442. <\/p>\n<h2>Ripple &amp; Jetpack Compose<\/h2>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f <strong>Jetpack Compose<\/strong>, \u0442\u043e \u0437\u0434\u0435\u0441\u044c <strong>Ripple<\/strong> \u2014 \u044d\u0442\u043e \u0447\u0430\u0441\u0442\u044c <strong>Material Design<\/strong>.<\/p>\n<p>\u0412\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <strong>Ripple<\/strong> \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a <a href=\"https:\/\/developer.android.com\/reference\/kotlin\/androidx\/compose\/material\/ripple\/package-summary\">\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/a>.<br \/><strong>Material Design 2<\/strong> \u0438 <strong>Material Design 3<\/strong>, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443.<br \/>\u0410 \u0435\u0449\u0435, \u043a\u0430\u043a \u0431\u043e\u043d\u0443\u0441, \u043d\u0438\u0447\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0434\u0438\u0437\u0430\u0439\u043d-\u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>Ripple<\/strong> \u043d\u043e, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 <strong>Material<\/strong>&#8216;\u043e\u0432.<\/p>\n<h3>Ripple &amp; Jetpack Compose \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/h3>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong>Material Design 2<\/strong>.<br \/>(\u043e\u043d \u0436\u0435 <code>androidx.compose.material:material<\/code> \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u0445).<\/p>\n<pre><code class=\"kotlin\">@Composable fun Content() {     MaterialTheme {         Text(             modifier = Modifier.clickable { },             text = \"Hello world!\"         )     } }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u2014 \u0432\u0438\u0434\u0438\u043c <strong>Ripple<\/strong>. <\/p>\n<p>\u0417\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c <code>MaterialTheme<\/code> (3 \u0438 8 \u0441\u0442\u0440\u043e\u043a\u0438).<br \/>\u0422\u0435\u043f\u0435\u0440\u044c <strong>Ripple<\/strong> \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043d\u043e \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u0437\u0430\u0442\u0435\u043c\u043d\u0435\u043d\u0438\u0435.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043b\u0435\u0432\u0430 \u2014 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 <code>MaterialTheme<\/code>, \u0441\u043f\u0440\u0430\u0432\u0430 \u2014 \u0431\u0435\u0437<br \/>(\u0430 \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0441\u044f)<\/figcaption><\/div>\n<\/figure>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e <code>MaterialTheme<\/code> \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 <code>Modifier.clickable { }<\/code>  \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 <strong>Ripple<\/strong>. \u041d\u043e \u043a\u0430\u043a?<\/p>\n<p>\u0417\u0430\u0433\u043b\u044f\u043d\u0435\u043c \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <code>Modifier.clickable { }<\/code>. <\/p>\n<pre><code class=\"kotlin\">fun Modifier.clickable(     ... ) = composed(...) {     Modifier.clickable(         ...         indication = LocalIndication.current,         interactionSource = remember { MutableInteractionSource() }     ) }<\/code><\/pre>\n<p>\u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <code>MutableInteractionSource<\/code> \u0438 <code>Indication<\/code>. \u041f\u043e\u0447\u0438\u0442\u0430\u0435\u043c <a href=\"https:\/\/developer.android.com\/reference\/kotlin\/androidx\/compose\/foundation\/package-summary#(androidx.compose.ui.Modifier).clickable(androidx.compose.foundation.interaction.MutableInteractionSource,androidx.compose.foundation.Indication,kotlin.Boolean,kotlin.String,androidx.compose.ui.semantics.Role,kotlin.Function0)\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a> \u043c\u0435\u0442\u043e\u0434\u0430. <\/p>\n<blockquote>\n<p><strong>indication<\/strong> &#8212; indication to be shown when modified element is pressed. Be default, indication from <code>LocalIndication<\/code> will be used. Pass <strong>null<\/strong> to show no indication, or current value from <code>LocalIndication<\/code> to show theme default<\/p>\n<\/blockquote>\n<p>\u0421\u0442\u0430\u043b\u043e \u0431\u044b\u0442\u044c, \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e <strong>Ripple <\/strong>\u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>Indication<\/code>.<br \/>\u041d\u0443 \u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <strong>Ripple <\/strong>\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>LocalIndication<\/code>.<\/p>\n<p>\u041d\u043e \u043f\u0440\u0438 \u0447\u0435\u043c \u0437\u0434\u0435\u0441\u044c <code>MutableInteractionSource<\/code>? <\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f. <br \/>\u0417\u0430\u043e\u0434\u043d\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0439, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u044f\u043c\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.<\/p>\n<h3>Interaction<\/h3>\n<p><code>MutableInteractionSource<\/code> \u2014 \u044d\u0442\u043e, \u043f\u043e \u0441\u0443\u0442\u0438, <code>Flow&lt;Interaction><\/code>. <\/p>\n<p><code>Interaction<\/code> \u043e\u0442\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0447\u0430\u043b \u0438\u043b\u0438 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b \u043d\u0430\u0436\u0430\u0442\u0438\u0435, \u0432\u0437\u044f\u043b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432 \u0444\u043e\u043a\u0443\u0441.<\/p>\n<p><code>Interaction<\/code> \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412\u0441\u0435\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0440\u044f\u043c\u044b\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 <code>Interaction<\/code>: <br \/><code>PressInteraction<\/code> , <code>FocusInteraction<\/code> , <code>HoverInteraction<\/code> , <code>DragInteraction<\/code>.<\/p>\n<p>\u0418\u0445 \u0432 \u0446\u0435\u043b\u043e\u043c \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u043d\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043f\u0440\u044f\u043c\u044b\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0447\u0435\u043a: \u043e\u0434\u043d\u0443 \u043f\u043e\u0434 \u043d\u0430\u0447\u0430\u043b\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0432\u0442\u043e\u0440\u0443\u044e \u2014 \u043f\u043e\u0434 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435, \u0442\u0440\u0435\u0442\u044c\u044e (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e) \u2014 \u043f\u043e\u0434 \u043e\u0442\u043c\u0435\u043d\u0443.<br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 <a href=\"https:\/\/developer.android.com\/reference\/kotlin\/androidx\/compose\/foundation\/interaction\/PressInteraction\">PressInteraction<\/a> \u044d\u0442\u043e <code>Press<\/code>, <code>Release<\/code> \u0438 <code>Cancel<\/code>. <\/p>\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0443\u0436\u043d\u043e?<\/p>\n<p><code>MutableInteractionSource<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c \u0438 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0435\u0433\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"kotlin\">val interactionSource = remember { MutableInteractionSource() } val isPressed by interactionSource.collectIsPressedAsState()  Button(     onClick = { \/* do something *\/ },     interactionSource = interactionSource) {     Text(if (isPressed) \"Pressed!\" else \"Not pressed\") }<\/code><\/pre>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e <code>Interaction<\/code> \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d \u0432 <a href=\"https:\/\/developer.android.com\/jetpack\/compose\/touch-input\/handling-interactions\">\u0434\u0430\u043d\u043d\u043e\u043c \u0433\u0430\u0439\u0434\u0435<\/a>.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0435\u0441\u043b\u0438 \u0437\u0430\u043a\u043e\u043f\u0430\u0442\u044c\u0441\u044f \u0433\u043b\u0443\u0431\u0436\u0435 \u0432 <code>Modifier.clickable { }<\/code>, \u0442\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f <code>Modifier.hoverable()<\/code> \u0438 <code>Modifier.focusable()<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f <strong>interactionSource<\/strong> \u0438\u0437 <code>Modifier.clickable { }<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c <code>Interaction<\/code>&#8216;\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e, \u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u043f\u043e <strong>focus<\/strong>, \u0438 \u043f\u043e <strong>hover<\/strong>.<\/p>\n<h3>Indication<\/h3>\n<p><code>Indication<\/code> \u2014 \u044d\u0442\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u0445 <code>Interaction<\/code>&#8216;\u043e\u0432.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u043d\u043e \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u0432\u0445\u043e\u0434 <code>Flow&lt;Interaction><\/code> \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>IndicationInstance<\/code>, \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u043e\u0439.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e <code>Indication<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 <code>Interaction<\/code>.<br \/>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u0440\u043c\u0438\u043d\u044b \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0432 \u043f\u0430\u0440\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0441 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e <code>Indication<\/code>, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <code>Modifier.indication(...)<\/code>, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <code>InteractionSource<\/code> \u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0439 \u043e\u0442 \u043d\u0435\u0433\u043e <code>Indication<\/code>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c <code>Ripple<\/code> \u0438 <code>DefaultDebugIndication<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u0441 <code>MaterialTheme<\/code> \u0432 <code>LocalIndication<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>Ripple<\/code>.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u044f \u0431\u0435\u0437 <code>MaterialTheme<\/code> \u0432 <code>LocalIndication<\/code> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>DefaultDebugIndication<\/code>. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0438 \u0432\u0438\u0434\u0438\u043c &#171;\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u0437\u0430\u0442\u0435\u043c\u043d\u0435\u043d\u0438\u0435&#187; \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438.<\/p>\n<p>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044f\u0441\u044c \u043a <code>Modifier.clickable { }<\/code>. <br \/>\u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d \u043c\u0435\u0442\u043e\u0434 \u0441 <code>MutableInteractionSource<\/code> \u0438 <code>Indication<\/code>?<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f <code>Interaction<\/code>&#8216;\u043e\u0432<br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043d\u0430\u0436\u0430\u0442<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043e\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0433\u043e (\u0432 <code>LocalIndication<\/code>) <code>Indication<\/code>&#8216;a<br \/>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u043a\u0430\u043a\u043e\u0439-\u043b\u0438\u0431\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442 (\u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f)<\/p>\n<\/li>\n<\/ol>\n<h3>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Compose Material Ripple<\/h3>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c <code>Interaction<\/code> \u0438 <code>Indication<\/code>. \u0422\u0430\u043a\u0436\u0435 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u0436\u0435 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u0447\u0442\u043e <strong>Ripple <\/strong>\u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 <code>MaterialTheme<\/code>. \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u044c.<\/p>\n<pre><code class=\"kotlin\">@Composable fun MaterialTheme(   ... ) {     ...     val rippleIndication = rememberRipple()     CompositionLocalProvider(         LocalIndication provides rippleIndication,         LocalRippleTheme provides MaterialRippleTheme,         ...     ) {       ...     } } <\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 <code>LocalIndication<\/code> \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>rememberRipple()<\/code>. <\/p>\n<p><code>rememberRipple()<\/code> \u2014 \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>Compose Material Ripple<\/strong>. <\/p>\n<p>\u041f\u0440\u043e\u0432\u0430\u043b\u0438\u043c\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0412\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <code>Indication<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <code>PlatformRipple<\/code>. <\/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-349130","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/349130","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=349130"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/349130\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=349130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=349130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=349130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}