{"id":394966,"date":"2024-06-29T11:55:58","date_gmt":"2024-06-29T11:55:58","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=394966"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=394966","title":{"rendered":"<span>Python GUI. \u041e\u0431\u0437\u043e\u0440 Hero Animation \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 KivyMD<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jh\/s8\/vc\/jhs8vcx7czff1ktd_gr21dednyy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jh\/s8\/vc\/jhs8vcx7czff1ktd_gr21dednyy.png\"\/><\/div>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0430\u0441, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0438 \u0438 \u0437\u043d\u0430\u0442\u043e\u043a\u0438 Python! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0437\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u0441\u0442\u0438\u043b\u0435 Google Material Design \u0434\u043b\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Kivy \u2014 KivyMD. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Hero \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 KivyMD.<a name=\"habracut\"><\/a><\/p>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c \u043d\u0438 \u0441 Kivy \u043d\u0438 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 KivyMD, \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u043d\u0430\u043f\u043e\u043c\u043d\u044e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/366\/c10\/9fb\/366c109fba66bb6dbcc94639f0607d2c.png\" align=\"left\" data-src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/366\/c10\/9fb\/366c109fba66bb6dbcc94639f0607d2c.png\"\/><br \/>  Kivy \u2014 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Python\/Cython. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0432\u043e\u0434\u0430: WM_Touch, WM_Pen, Mac OS X Trackpad Magic Mouse, Mtdev, Linux Kernel HID, TUIO\u2026<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ix\/lu\/sy\/ixlusycxhxvswspzgebf71rtcyc.png\" align=\"left\" data-src=\"https:\/\/habrastorage.org\/webt\/ix\/lu\/sy\/ixlusycxhxvswspzgebf71rtcyc.png\"\/><br \/>  KivyMD \u2014 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u044f\u044f open source \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c Python, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0430\u044f \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u0441\u0442\u0438\u043b\u0435 Google Material Design, \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c Kivy. \u0412\u043d\u0435 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Kivy \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u2014 \u0431\u0435\u0442\u0430 (PIP \u0432\u0435\u0440\u0441\u0438\u044f 0.104.2). \u041c\u0430\u0441\u0442\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0430 GitHub \u2014 1.0.0<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 hero \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438? <\/p>\n<blockquote><p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u044b \u0432\u0438\u0434\u0435\u043b\u0438 \u0442\u0430\u043a\u0443\u044e \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044e \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u0442\u043e\u0432\u0430\u0440\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430\u0436\u0438. \u0422\u0430\u043f \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442 \u044d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u201c\u041a\u0443\u043f\u0438\u0442\u044c\u201d. \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f hero \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0435\u0439 (<i>\u0432\u044b\u0434\u0435\u0440\u0436\u043a\u0430 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Flutter<\/i>).<\/p><\/blockquote>\n<p>  \u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f hero \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432 KivyMD:<\/p>\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/62d124719c344d33ecf976fb\" data-style=\"\" id=\"62d124719c344d33ecf976fb\" width=\"\"><\/div>\n<\/div>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 hero \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ul>\n<li>\u041d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 <b>A<\/b> \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 MDHeroFrom;<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0435\u0433 (\u0441\u0442\u0440\u043e\u043a\u0443) \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 MDHeroFrom;<\/li>\n<li>\u0420\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0433\u0435\u0440\u043e\u044f (\u0432\u0438\u0434\u0436\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439) \u0432 MDHeroFrom \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435;<\/li>\n<li>\u041d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 <b>B<\/b> \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 MDHeroTo \u2014 \u0433\u0435\u0440\u043e\u0439 \u0441 \u044d\u043a\u0440\u0430\u043d\u0430 <b>A<\/b> \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/li>\n<\/ul>\n<p>  \u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/9c\/-v\/hq\/9c-vhqtoqldw8k-ruokrn9h40q8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/9c\/-v\/hq\/9c-vhqtoqldw8k-ruokrn9h40q8.png\"\/><\/div>\n<p>  \u041a\u043e\u0434:<\/p>\n<pre><code class=\"json\">MDScreenManager:      MDScreen:         name: \"screen A\"          MDHeroFrom:             tag: \"hero\"              FitImage:      MDScreen:         name: \"screen B\"          MDHeroTo: <\/code><\/pre>\n<p>  \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e hero \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 (\u0442\u043e, \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f):<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vs\/n1\/6n\/vsn16ng6uv2ieceonw3xh5q-ntc.gif\" data-src=\"https:\/\/habrastorage.org\/webt\/vs\/n1\/6n\/vsn16ng6uv2ieceonw3xh5q-ntc.gif\"\/><\/div>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 KivyMD:<\/p>\n<pre><code class=\"bash\">pip install https:\/\/github.com\/kivymd\/KivyMD\/archive\/master.zip <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0432\u0441\u0451. \u0412\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. <\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h3>\n<p>  KivyMD \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <i>create_project<\/i> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c MVC. \u041e \u0442\u043e\u043c \u043a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u044d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/580132\/\">\u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441 \u0440\u044f\u0434\u043e\u043c \u043d\u0438\u0436\u0435\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  \u0428\u0430\u0431\u043b\u043e\u043d \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">python -m kivymd.tools.patterns.create_project \\     name_pattern \\     path_to_project \\     name_project \\     python_version \\     kivy_version <\/code><\/pre>\n<p>  \u041f\u0438\u0440\u043c\u0435\u0440 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">python -m kivymd.tools.patterns.create_project \\     MVC \\     \/Path\/To\/Project \\     HeroAnimation \\     python3.10 \\     2.1.0 <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c MVC. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 Python 3.10, \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 Kivy 2.1.0 \u0438 \u043c\u0430\u0441\u0442\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 (1.0.0-dev0) \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 KivyMD. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u044d\u0442\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/kivymd.readthedocs.io\/en\/latest\/api\/kivymd\/tools\/patterns\/create_project\/\" rel=\"nofollow noopener noreferrer\">\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c\u0438<\/a> \u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 <i>&#8212;name_screen<\/i> \u2014 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u043c\u0435\u043d\u0430 Views (\u044d\u043a\u0440\u0430\u043d\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 hero \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0430 View. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u0445 FirstScreen \u0438 SecondScreen. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u0438\u0434:<\/p>\n<pre><code class=\"bash\">python -m kivymd.tools.patterns.create_project \\     MVC \\     \/Path\/To\/Project \\     HeroAnimation \\     python3.10 \\     2.1.0 \\     --name_screen FirstScreen SecondScreen <\/code><\/pre>\n<p>  \u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u0434\u0432\u0443\u043c\u044f View:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/a2\/zg\/4q\/a2zg4qdsa9oyvvjr-nvaqzvwe3q.png\" data-src=\"https:\/\/habrastorage.org\/webt\/a2\/zg\/4q\/a2zg4qdsa9oyvvjr-nvaqzvwe3q.png\"\/><\/div>\n<p>  \u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u0435\u0440\u043e\u044f. \u0412 \u043f\u0430\u043a\u0435\u0442\u0435 \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u044c\u044e\u0448\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0430\u043a\u0435\u0442 <i>components<\/i>. \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0438\u043b\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 UI \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (\u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432) \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e View. \u041c\u044b \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u043c \u0442\u0430\u043c \u043f\u0430\u043a\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0432\u0438\u0434\u0436\u0435\u0442 \u0433\u0435\u0440\u043e\u044f:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/w_\/mx\/8z\/w_mx8z1bwcjmho2p0hwekb7ajf8.png\" data-src=\"https:\/\/habrastorage.org\/webt\/w_\/mx\/8z\/w_mx8z1bwcjmho2p0hwekb7ajf8.png\"\/><\/div>\n<p>  \u0412 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435 \u0433\u0435\u0440\u043e\u044f \u043c\u044b \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0441 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 MDHeroFrom \u0438 \u0432 \u043d\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435. \u041d\u0438\u0436\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c \u043c\u0435\u0442\u043a\u0443 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/bu\/7a\/ox\/bu7aoxogn1s7mddzncm7nbv0ltq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/bu\/7a\/ox\/bu7aoxogn1s7mddzncm7nbv0ltq.png\"\/><\/div>\n<p>  \u041f\u0440\u0438 \u0442\u0430\u043f\u0435 \u043f\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0433\u0435\u0440\u043e\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u043c\u0435\u0442\u043e\u0434 <i>switch_screen<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432 \u0431\u0430\u0437\u043e\u0432\u043e\u043c python \u043a\u043b\u0430\u0441\u0441\u0435 \u0433\u0435\u0440\u043e\u044f. \u041c\u0435\u0442\u043e\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0438\u043c\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u0435\u0440\u043e\u044f \u0434\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0438 \u0438\u043c\u044f View, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442:<\/p>\n<pre><code class=\"python\">from kivy.properties import ObjectProperty from kivy.uix.behaviors import ButtonBehavior  from kivymd.uix.boxlayout import MDBoxLayout   class Hero(ButtonBehavior, MDBoxLayout):     \"\"\"\u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0432\u0438\u0434\u0436\u0435\u0442 \u0433\u0435\u0440\u043e\u044f.\"\"\"      manager = ObjectProperty()  # \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u044d\u043a\u0440\u0430\u043d\u043e\u0432      def switch_screen(self):         \"\"\"\u041c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0442\u0430\u043f\u0435 \u043f\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0433\u0435\u0440\u043e\u044f.\"\"\"          # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u0435\u0440\u043e\u044f \u0434\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430.         self.manager.current_hero = self.ids.hero.tag         # \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d.         self.manager.current = \"second screen\" <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0432\u0438\u0434\u0436\u0435\u0442 \u0433\u0435\u0440\u043e\u0439 \u0441\u043e\u0437\u0434\u0430\u043d \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0435 \u043f\u0435\u0440\u0432\u043e\u043c View:<\/p>\n<pre><code class=\"json\">&lt;FirstScreenView>     md_bg_color: \"white\"      Hero:         pos_hint: {'center_x': .5, \"center_y\": .5}         manager: root.manager_screens <\/code><\/pre>\n<p>  \u041d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c View \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442 MDHeroTo \u2014 \u0442\u043e \u043c\u0435\u0441\u0442\u043e, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0442\u044c \u0433\u0435\u0440\u043e\u0439:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/r_\/aj\/ow\/r_ajowgnqafmvhtlsybxw6gsz84.png\" data-src=\"https:\/\/habrastorage.org\/webt\/r_\/aj\/ow\/r_ajowgnqafmvhtlsybxw6gsz84.png\"\/><\/div>\n<p>  \u0414\u043b\u044f View, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0432\u0438\u0434\u0436\u0435\u0442 MDHeroTo, \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n<pre><code class=\"json\">&lt;SecondScreenView>     hero_to: hero_to <\/code><\/pre>\n<p>  <\/p>\n<h3>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438 \u0433\u0435\u0440\u043e\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438<\/h3>\n<p>  \u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u043b\u0435\u0442\u0430 \u0433\u0435\u0440\u043e\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u044f. \u041d\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043b\u0435\u0442\u0430 \u0433\u0435\u0440\u043e\u044f, \u043a\u0440\u043e\u043c\u0435 \u0435\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u0430\u043a <i>on_transform_in<\/i> \u2014 \u043f\u0435\u0440\u0435\u043b\u0435\u0442 \u0441 \u044d\u043a\u0440\u0430\u043d\u0430 <b>\u0410<\/b> \u043d\u0430 \u044d\u043a\u0440\u0430\u043d <b>\u0411<\/b> \u0438 <i>on_transform_out<\/i> \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0441 \u044d\u043a\u0440\u0430\u043d\u0430 <b>\u0411<\/b> \u043d\u0430 \u044d\u043a\u0440\u0430\u043d <b>\u0410<\/b>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0433\u0435\u0440\u043e\u0439 \u0432\u0440\u0430\u0449\u0430\u043b\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u043b\u0435\u0442\u0430 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442 <i>RotateWiget<\/i>. \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0433\u0435\u0440\u043e\u044f \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430:<\/p>\n<pre><code class=\"python\">class HeroImage(RotateWidget, FitImage):     pass <\/code><\/pre>\n<p>  \u2026 \u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432\u043c\u0435\u0441\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e <i>FitImage<\/i> \u0432 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0435 \u0433\u0435\u0440\u043e\u044f, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 on_transform_in \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u0435\u0440\u043e\u044f:<\/p>\n<pre><code class=\"json\">&lt;Hero>     [...]      MDHeroFrom:         [...]          HeroImage:             [...]             on_transform_in: root.on_transform_in(*args)      MDLabel:         [...] <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043a\u043b\u0430\u0441\u0441 <i>Hero<\/i> \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 on_transform_in:<\/p>\n<pre><code class=\"python\">    def on_transform_in(self, instance_hero_widget, instance_image, duration):         \"\"\"\u0410\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u0435\u0440\u043e\u044f.\"\"\"          Animation(rotate_value_angle=360, duration=duration).start(             instance_image         ) <\/code><\/pre>\n<p>  \u041a\u043b\u0430\u0441\u0441 \u0433\u0435\u0440\u043e\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043c\u0435\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">from kivy.animation import Animation from kivy.properties import ObjectProperty from kivy.uix.behaviors import ButtonBehavior  from kivymd.uix.boxlayout import MDBoxLayout from kivymd.uix.fitimage import FitImage from kivymd.uix.templates import RotateWidget   class HeroImage(RotateWidget, FitImage):     \"\"\"     \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0433\u0435\u0440\u043e\u044f \u0441\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u043c\u0438 \u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442.     \"\"\"   class Hero(ButtonBehavior, RotateWidget, MDBoxLayout):     \"\"\"\u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0432\u0438\u0434\u0436\u0435\u0442 \u0433\u0435\u0440\u043e\u044f.\"\"\"      manager = ObjectProperty()  # \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u044d\u043a\u0440\u0430\u043d\u043e\u0432      def on_transform_in(self, instance_hero_widget, instance_image, duration):         \"\"\"\u0410\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u0435\u0440\u043e\u044f \u043d\u0430 360 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432.\"\"\"          Animation(rotate_value_angle=360, duration=duration).start(             instance_image         )      def switch_screen(self):         \"\"\"\u041c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0442\u0430\u043f\u0435 \u043f\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0433\u0435\u0440\u043e\u044f.\"\"\"          # \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043c\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0433\u0435\u0440\u043e\u044f \u0434\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430.         self.manager.current_hero = self.ids.hero.tag         # \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u044d\u043a\u0440\u0430\u043d.         self.manager.current = \"second screen\" <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u0440\u0438 \u0442\u0430\u043f\u0435 \u043f\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0433\u0435\u0440\u043e\u044f \u0438\u043c\u0435\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/p2\/jb\/u5\/p2jbu54wnc0sxupeukvsznhrjt0.gif\" data-src=\"https:\/\/habrastorage.org\/webt\/p2\/jb\/u5\/p2jbu54wnc0sxupeukvsznhrjt0.gif\"\/><\/div>\n<p>  \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0433\u0435\u0440\u043e\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <i>on_transform_out<\/i>:<\/p>\n<pre><code class=\"python\">    def on_transform_out(self, instance_hero_widget, instance_image, duration):         Animation(rotate_value_angle=0, duration=duration).start(             instance_image         ) <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"json\">&lt;Hero>     [...]      MDHeroFrom:         [...]          HeroImage:             [...]             on_transform_in: root.on_transform_in(*args)             on_transform_out: root.on_transform_out(*args)      MDLabel:         [...] <\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ez\/oc\/lw\/ezoclwweiz8optaj4or0amkvhho.gif\" data-src=\"https:\/\/habrastorage.org\/webt\/ez\/oc\/lw\/ezoclwweiz8optaj4or0amkvhho.gif\"\/><\/div>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/677190\/\"> https:\/\/habr.com\/ru\/articles\/677190\/<\/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-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jh\/s8\/vc\/jhs8vcx7czff1ktd_gr21dednyy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jh\/s8\/vc\/jhs8vcx7czff1ktd_gr21dednyy.png\"\/><\/div>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0432\u0430\u0441, \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0438 \u0438 \u0437\u043d\u0430\u0442\u043e\u043a\u0438 Python! \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0431\u0437\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u0441\u0442\u0438\u043b\u0435 Google Material Design \u0434\u043b\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Kivy \u2014 KivyMD. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Hero \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 KivyMD.<\/p>\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-394966","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394966","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=394966"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/394966\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=394966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=394966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=394966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}