{"id":460619,"date":"2025-05-22T22:02:48","date_gmt":"2025-05-22T22:02:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=460619"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=460619","title":{"rendered":"<span>\u041c\u0430\u0441\u0442\u0435\u0440\u0441\u0442\u0432\u043e \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u043d\u0430 Compose (\u0447\u0430\u0441\u0442\u044c 2): \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041a\u043e\u0441\u0442\u044f, \u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0435 PREMIER. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c PREMIER \u0434\u043b\u044f Android TV \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 Jetpack Compose \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0438 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u0442\u0435\u043c\u0430. \u0410 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u0432\u0440\u043e\u0434\u0435 \u0422\u0412-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0431\u0435\u0437 \u0441\u0435\u043d\u0441\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0442\u0435\u043c\u0443 \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u0432 Compose \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/baf\/28e\/3cc\/baf28e3cc18b1735066c8def94f4faea.png\" width=\"780\" height=\"440\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/baf\/28e\/3cc\/baf28e3cc18b1735066c8def94f4faea.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/baf\/28e\/3cc\/baf28e3cc18b1735066c8def94f4faea.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0424\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0432 Jetpack Compose \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0417\u0430 \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0441\u0442\u043e\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u043e\u0434, \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u043a\u0430\u043a\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/companies\/habr_rutube\/articles\/902310\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 Compose \u0438 \u0442\u043e, \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0444\u043e\u043a\u0443\u0441\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438: \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>requestFocus()<\/code>, \u043a\u0430\u043a Compose \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b \u0432 Compose 1.8, \u0447\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u0434 Android TV, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0444\u043e\u043a\u0443\u0441\u043e\u0432, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441.<\/p>\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"#requestFocus\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose<\/a> <\/p>\n<ul>\n<li>\n<p>\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043d\u043e\u0434\u0430\u043c\u0438 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 FocusRequester<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#Mechanism\">\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 Compose<\/a><\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 Compose \u0432\u0435\u0440\u0441\u0438\u0438 1.8<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#outro\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"requestFocus\" id=\"requestFocus\"><\/a><\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>requestFocus()<\/code>, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u043e\u043a\u0443\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u0430 \u044d\u0442\u0438\u043c \u0441\u0442\u043e\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c. Compose \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438 \u043a\u0430\u043a\u043e\u0439 \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432\u044b\u0431\u0440\u0430\u0442\u044c. \u0414\u0430\u0432\u0430\u0439 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0438 \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<h4>\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043d\u043e\u0434\u0430\u043c\u0438 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/h4>\n<p>\u0412 Jetpack Compose \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0432\u0438\u0434\u0435 <strong>\u043d\u043e\u0434\u044b<\/strong> (<strong>Node<\/strong>). \u042d\u0442\u0438 \u043d\u043e\u0434\u044b \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 <strong>UI-\u0434\u0435\u0440\u0435\u0432\u043e<\/strong> \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n<ul>\n<li>\n<p><strong>\u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong> \u2014 <code>LayoutNode<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0432\u043e\u0434\u0430 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/strong> \u2014 <code>ModifierNode<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>\u0444\u043e\u043a\u0443\u0441 \u0438 \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> \u2014 <code>FocusTargetNode<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>\u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/strong> \u2014 <code>DrawNode<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>Modifier.focusTarget<\/code>, Compose \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u043e\u043a\u0443\u0441-\u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441. \u0410\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>Modifier.focusRequester<\/code> \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0434\u0443 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c <code>FocusRequester<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0444\u043e\u043a\u0443\u0441\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043d\u043e\u0434, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e <a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\/phases\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e Android \u043f\u043e \u0444\u0430\u0437\u0430\u043c Compose<\/a> \u2014 \u0442\u0430\u043c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u044b \u044d\u0442\u0430\u043f\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f UI-\u0434\u0435\u0440\u0435\u0432\u0430.<\/p>\n<h4>\u0417\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 FocusRequester<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <code>FocusRequester<\/code>. \u041e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u00ab\u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u00bb \u043c\u0435\u0436\u0434\u0443 \u0444\u043e\u043a\u0443\u0441-\u043d\u043e\u0434\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 Compose.<\/p>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"kotlin\">val focusRequester = FocusRequester()  TextField(     value = text,     onValueChange = { text = it },     modifier = Modifier         .focusRequester(focusRequester)         .focusTarget() )  Button(onClick = { focusRequester.requestFocus() }) {     Text(\"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441\") }<\/code><\/pre>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>FocusRequester<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Modifier.focusRequester<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <code>Modifier.focusTarget<\/code>, \u0447\u0442\u043e\u0431\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0433 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>focusRequester.requestFocus()<\/code>, \u0438 \u0444\u043e\u043a\u0443\u0441 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 <code>TextField<\/code>.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u26a0\ufe0f <strong>\u0412\u0430\u0436\u043d\u043e:<\/strong> \u0415\u0441\u043b\u0438 <code>FocusRequester<\/code> \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043d\u043e\u0434\u0435 \u0447\u0435\u0440\u0435\u0437 <code>focusRequester<\/code>, \u0432\u044b\u0437\u043e\u0432 <code>requestFocus()<\/code> \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<\/blockquote>\n<h4>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>requestFocus()<\/code>, Compose \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p><strong>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u0435\u0440\u0435\u0432 \u043d\u043e\u0434<\/strong> \u2014 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0430\u044f \u0444\u043e\u043a\u0443\u0441-\u043d\u043e\u0434\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441 <code>FocusRequester<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u0430<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>onFocusChanged<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442<\/strong> \u2014 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0444\u043e\u043a\u0443\u0441\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0442\u0435\u0440\u044f\u0435\u0442 \u0444\u043e\u043a\u0443\u0441 (\u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u044b\u043b \u0430\u043a\u0442\u0438\u0432\u0435\u043d), \u0430 \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0435\u0433\u043e;<\/p>\n<\/li>\n<li>\n<p><strong>\u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442 UI<\/strong> \u2014 Compose \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0440\u0430\u043c\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0444\u043e\u043a\u0443\u0441 \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u2014 \u043b\u0438\u0431\u043e \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e? \u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b <code>FocusRequester<\/code> \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432:<\/p>\n<ul>\n<li>\n<p><strong>\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f<\/strong>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0422\u0412 \u0438\u043b\u0438 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p><strong>\u0444\u043e\u0440\u043c\u044b \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f<\/strong> \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c<\/strong> \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0434\u043b\u044f screen reader&#8217;\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0444\u043e\u043a\u0443\u0441\u0430 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Compose \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0434\u043e 1.7 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 1.8. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0444\u043e\u043a\u0443\u0441 \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0438 \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p><a class=\"anchor\" name=\"Mechanism\" id=\"Mechanism\"><\/a><\/p>\n<h3>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 Compose<\/h3>\n<h4>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 requestFocus()<\/h4>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0432\u044b\u0437\u043e\u0432 <code>requestFocus()<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"kotlin\">fun requestFocus() {       focus()   }<\/code><\/pre>\n<p>\u041d\u043e \u0437\u0430 \u044d\u0442\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0441\u043a\u0440\u044b\u0442\u0430 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0449\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u043d\u043e\u0434\u0443 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<h4>\u0412\u044b\u0437\u043e\u0432 focus()<\/h4>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>requestFocus()<\/code> \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>focus()<\/code>. \u0412\u043e\u0442 \u043a\u0430\u043a \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<pre><code class=\"kotlin\">internal fun focus(): Boolean = findFocusTargetNode { it.requestFocus() }<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f focus():<\/strong><\/p>\n<ul>\n<li>\n<p>\u0438\u0449\u0435\u0442 \u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u043d\u043e\u0434\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0443 \u043d\u0435\u0451 <code>requestFocus<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>true<\/code>, \u0435\u0441\u043b\u0438 \u0444\u043e\u043a\u0443\u0441 \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e Compose \u0438\u0449\u0435\u0442 \u044d\u0442\u0443 \u043d\u043e\u0434\u0443.<\/p>\n<h4>FocusableNode \u0438 FocusTargetModifierNode<\/h4>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u2014 \u044d\u0442\u043e <strong>FocusableNode<\/strong>. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441.<\/p>\n<pre><code class=\"kotlin\">internal class FocusableNode(       interactionSource: MutableInteractionSource?   ) : DelegatingNode(), FocusEventModifierNode, SemanticsModifierNode,       GlobalPositionAwareModifierNode, FocusRequesterModifierNode {        ...        init {           delegate(FocusTargetModifierNode())       }          ...     <\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/strong><\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u043e\u0434\u0430 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u043e\u043c \u0447\u0435\u0440\u0435\u0437 <code>FocusTargetModifierNode<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>Modifier.focusable()<\/code> \u0438\u043b\u0438 <code>Modifier.focusTarget()<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 Compose \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0430\u043c \u043f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043d\u043e\u0434\u044b.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>findFocusTargetNode<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"kotlin\">internal fun findFocusTargetNode(onFound: (FocusTargetNode) -&gt; Boolean): Boolean {       @OptIn(ExperimentalComposeUiApi::class)       return findFocusTarget { focusTarget -&gt;           if (focusTarget.fetchFocusProperties().canFocus) {               onFound(focusTarget)           } else {               focusTarget.findChildCorrespondingToFocusEnter(Enter, onFound)           }       }   }<\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/strong> \u2014 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043d\u043e\u0434\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 <code>FocusRequester<\/code>, \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 canFocus.<\/strong> \u0415\u0441\u043b\u0438 \u0443 \u043d\u043e\u0434\u044b <code>canFocus = true<\/code>, \u043e\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a \u0441\u0440\u0435\u0434\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/strong> \u0415\u0441\u043b\u0438 \u043d\u043e\u0434\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0438 \u0435\u0451 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>findChildCorrespondingToFocusEnter<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u043e\u0431\u0445\u043e\u0434.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043d\u043e\u0434\u044b: findFocusTarget<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>findFocusTarget<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0432\u0441\u0435\u043c \u043d\u043e\u0434\u0430\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 <code>FocusRequester<\/code>, \u0438\u00a0\u0438\u0449\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0430:<\/p>\n<pre><code class=\"kotlin\">private inline fun findFocusTarget(onFound: (FocusTargetNode) -&gt; Boolean): Boolean {       check(this !== Default) { InvalidFocusRequesterInvocation }       check(this !== Cancel) { InvalidFocusRequesterInvocation }       check(focusRequesterNodes.isNotEmpty()) { FocusRequesterNotInitialized }       var success = false       focusRequesterNodes.forEach { node -&gt;           node.visitChildren(Nodes.FocusTarget) {               if (onFound(it)) {                   success = true                   return@forEach               }           }       }    return success   }<\/code><\/pre>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0448\u0430\u0433\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong> \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0443 <code>FocusRequester<\/code> \u0435\u0441\u0442\u044c \u043d\u043e\u0434\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0445\u043e\u0434 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434:<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>visitChildren<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435:<\/strong> \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u043d\u043e\u0434\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441, \u043e\u0431\u0445\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043d\u043e\u0434\u0430 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442? \u0422\u043e\u0433\u0434\u0430 \u0432 \u0445\u043e\u0434 \u0438\u0434\u0451\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>findChildCorrespondingToFocusEnter<\/code>.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430: findChildCorrespondingToFocusEnter<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043d\u043e\u0434\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, Compose \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430 \u0441\u0440\u0435\u0434\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"kotlin\">internal fun FocusTargetNode.findChildCorrespondingToFocusEnter(       direction: FocusDirection,       onFound: (FocusTargetNode) -&gt; Boolean   ): Boolean {          val focusableChildren = MutableVector()       collectAccessibleChildren(focusableChildren)          if (focusableChildren.size &lt;= 1) {           return focusableChildren.firstOrNull()?.let { onFound.invoke(it) } ?: false       }   val requestedDirection = when (direction) {         @OptIn(ExperimentalComposeUiApi::class)           Enter -&gt; Right           else -&gt; direction       }           val initialFocusRect = when (requestedDirection) {           Right, Down -&gt; focusRect().topLeft()           Left, Up -&gt; focusRect().bottomRight()           else -&gt; error(InvalidFocusDirection)       }       val nextCandidate = focusableChildren.findBestCandidate(initialFocusRect, requestedDirection)       return nextCandidate?.let { onFound.invoke(it) } ?: false   }<\/code><\/pre>\n<p><strong>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430:<\/strong><\/p>\n<pre><code class=\"kotlin\">internal fun FocusTargetNode.findChildCorrespondingToFocusEnter(       direction: FocusDirection,       onFound: (FocusTargetNode) -&gt; Boolean   ): Boolean {       val focusableChildren = MutableVector()       collectAccessibleChildren(focusableChildren)      if (focusableChildren.size &lt;= 1) {           return focusableChildren.firstOrNull()?.let { onFound.invoke(it) } ?: false       }<\/code><\/pre>\n<p><strong>1. \u0421\u0431\u043e\u0440 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432:<\/strong> \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>collectAccessibleChildren<\/code> \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441 (\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u043d\u0430 <code>canFocus<\/code>).<\/p>\n<p><strong>2. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430:<\/strong> \u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043e\u043d \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441.<\/p>\n<p><strong>3. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430.<\/strong>  \u0414\u043b\u044f \u0432\u0445\u043e\u0434\u0430 \u0438\u0437 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0438 Enter \u0438\u043b\u0438 \u0441 \u043f\u0443\u043b\u044c\u0442\u0430 \u043e\u0442 Android TV \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 OK \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 <code>FocusDirection.Enter<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043f\u0440\u0430\u0432\u043e <code>FocusDirection.Right<\/code>.<\/p>\n<p><strong>4. \u0412\u044b\u0431\u043e\u0440 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430 \u043d\u0430 \u0444\u043e\u043a\u0443\u0441. <\/strong>\u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Compose \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043f\u043e\u0438\u0441\u043a\u0430: \u0434\u043b\u044f \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043f\u0440\u0430\u0432\u043e \u0438\u043b\u0438 \u0432\u043d\u0438\u0437 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u2014 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043b\u0435\u0432\u044b\u0439 \u0443\u0433\u043e\u043b, \u0434\u043b\u044f \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043b\u0435\u0432\u043e \u0438\u043b\u0438 \u0432\u0432\u0435\u0440\u0445 \u2014 \u043d\u0438\u0436\u043d\u0438\u0439 \u043f\u0440\u0430\u0432\u044b\u0439 \u0443\u0433\u043e\u043b.<\/p>\n<pre><code class=\"kotlin\">val initialFocusRect = when (requestedDirection) {       Right, Down -&gt; focusRect().topLeft()       Left, Up -&gt; focusRect().bottomRight()       else -&gt; error(InvalidFocusDirection)   }<\/code><\/pre>\n<p><strong>5. \u041f\u043e\u0438\u0441\u043a \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430.<\/strong> \u041c\u0435\u0442\u043e\u0434 <code>findBestCandidate<\/code> \u0438\u0449\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438.<\/p>\n<pre><code class=\"kotlin\">val nextCandidate = focusableChildren.findBestCandidate(initialFocusRect, requestedDirection) return nextCandidate?.let { onFound.invoke(it) } ?: false<\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <\/strong><code><strong>findBestCandidate<\/strong><\/code><strong>:<\/strong><\/p>\n<pre><code class=\"kotlin\">internal fun MutableVector.findBestCandidate(     focusRect: Rect,     direction: FocusDirection ): FocusTargetNode? {       var searchResult: FocusTargetNode? = null        var bestCandidate = when (direction) {           Left -&gt; focusRect.translate(focusRect.width + 1, 0f)           Right -&gt; focusRect.translate(-(focusRect.width + 1), 0f)           Up -&gt; focusRect.translate(0f, focusRect.height + 1)           Down -&gt; focusRect.translate(0f, -(focusRect.height + 1))           else -&gt; error(InvalidFocusDirection)       }      forEach { candidateNode -&gt;           if (candidateNode.isEligibleForFocusSearch) {               val candidateRect = candidateNode.focusRect()               if (isBetterCandidate(candidateRect, bestCandidate, focusRect, direction)) {                   bestCandidate = candidateRect                   searchResult = candidateNode               }           }       }          return searchResult   }<\/code><\/pre>\n<h3>\u042d\u0442\u0430\u043f\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430:<\/h3>\n<ol>\n<li>\n<p><strong>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430.<\/strong> \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a, \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0444\u043e\u043a\u0443\u0441, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0442\u0438 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0445\u043e\u0434 \u043f\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c.<\/strong>  \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043c\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0435\u0433\u043e eligibility, \u0442.\u0435. \u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u043e\u043d \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432.<\/strong>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>isBetterCandidate<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0430, \u0447\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041a\u0430\u043a isBetterCandidate \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430<\/h4>\n<pre><code class=\"kotlin\">private fun isBetterCandidate(       proposedCandidate: Rect,       currentCandidate: Rect,       focusedRect: Rect,       direction: FocusDirection   ): Boolean {          fun Rect.isCandidate() = when (direction) {           Left -&gt; (focusedRect.right &gt; right || focusedRect.left &gt;= right) &amp;&amp; focusedRect.left &gt; left           Right -&gt; (focusedRect.left &lt; left || focusedRect.right &lt;= left) &amp;&amp; focusedRect.right &lt; right           Up -&gt; (focusedRect.bottom &gt; bottom || focusedRect.top &gt;= bottom) &amp;&amp; focusedRect.top &gt; top           Down -&gt; (focusedRect.top &lt; top || focusedRect.bottom &lt;= top) &amp;&amp; focusedRect.bottom &lt; bottom           else -&gt; error(InvalidFocusDirection)       }          fun Rect.majorAxisDistance(): Float {           val majorAxisDistance = when (direction) {               Left -&gt; focusedRect.left - right               Right -&gt; left - focusedRect.right               Up -&gt; focusedRect.top - bottom               Down -&gt; top - focusedRect.bottom               else -&gt; error(InvalidFocusDirection)           }           return max(0.0f, majorAxisDistance)       }          fun Rect.minorAxisDistance() = when (direction) {             Left, Right -&gt; (focusedRect.top + focusedRect.height \/ 2) - (top + height \/ 2)             Up, Down -&gt; (focusedRect.left + focusedRect.width \/ 2) - (left + width \/ 2)           else -&gt; error(InvalidFocusDirection)       }          fun weightedDistance(candidate: Rect): Long {           val majorAxisDistance = candidate.majorAxisDistance().absoluteValue.toLong()           val minorAxisDistance = candidate.minorAxisDistance().absoluteValue.toLong()           return 13 * majorAxisDistance * majorAxisDistance + minorAxisDistance * minorAxisDistance       }          return when {             !proposedCandidate.isCandidate() -&gt; false                     !currentCandidate.isCandidate() -&gt; true                      beamBeats(focusedRect, proposedCandidate, currentCandidate, direction) -&gt; true                    beamBeats(focusedRect, currentCandidate, proposedCandidate, direction) -&gt; false           else -&gt; weightedDistance(proposedCandidate) &lt; weightedDistance(currentCandidate)       }   }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>isBetterCandidate<\/code> \u0432 Compose \u0440\u0435\u0448\u0430\u0435\u0442, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u043c. \u041e\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/strong> \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0445\u043e\u0442\u044f \u0431\u044b \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 (\u0432\u043f\u0440\u0430\u0432\u043e, \u0432\u043b\u0435\u0432\u043e, \u0432\u0432\u0435\u0440\u0445 \u0438\u043b\u0438 \u0432\u043d\u0438\u0437).<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0446\u0435\u043d\u043a\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439.<\/strong> \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f: <\/p>\n<ul>\n<li>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> \u2014 \u043f\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0444\u043e\u043a\u0443\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u043a\u0440\u0430\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u043e \u043b\u0435\u0432\u043e\u0433\u043e \u043a\u0440\u0430\u044f \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430).<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> \u2014 \u043c\u0435\u0436\u0434\u0443 \u0446\u0435\u043d\u0442\u0440\u0430\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u043e\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u0424\u043e\u043a\u0443\u0441 \u043f\u043e \u00ab\u043b\u0443\u0447\u0443\u00bb (beam)<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441 \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438, \u043e\u043d \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0442\u0438\u044f \u043d\u0435\u0442, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u0435\u0439 (\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0438\u043b\u044c\u043d\u0435\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0432\u044b\u0431\u043e\u0440).<\/p>\n<\/li>\n<\/ol>\n<h4>\u0418\u0442\u043e\u0433: \u043f\u043e\u043b\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043f\u043e\u0438\u0441\u043a\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>requestFocus<\/code>, Compose \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0443\u0442\u044c:<\/p>\n<ol>\n<li>\n<p><strong>\u0412\u044b\u0437\u043e\u0432 <\/strong><code>requestFocus<\/code><strong>:<\/strong>  \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>requestFocus<\/code> \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043d\u043e\u0434\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043d\u043e\u0434\u044b:<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u043d\u043e\u0434\u0430 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f, \u043e\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441 \u0441\u0440\u0430\u0437\u0443;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u0441\u0440\u0435\u0434\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430 (<\/strong><code><strong>findChildCorrespondingToFocusEnter<\/strong><\/code><strong>):<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043d\u043e\u0434\u044b, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>collectAccessibleChildren<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u043e\u0434\u0438\u043d \u2014 \u043e\u043d \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u2014 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438:<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f <code>Right<\/code> \u0438\u043b\u0438 <code>Down<\/code> \u2014 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043b\u0435\u0432\u044b\u0439 \u0443\u0433\u043e\u043b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f <code>Left<\/code> \u0438\u043b\u0438 <code>Up<\/code> \u2014 \u043d\u0438\u0436\u043d\u0438\u0439 \u043f\u0440\u0430\u0432\u044b\u0439 \u0443\u0433\u043e\u043b.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430 <\/strong>(<code>findBestCandidate<\/code>). \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043d\u043e\u0434\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u043e\u043d\u0430 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0430: <\/p>\n<ul>\n<li>\n<p>\u041d\u043e\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0444\u043e\u043a\u0443\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u043d\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041e\u0446\u0435\u043d\u043a\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 <\/strong>(<code>isBetterCandidate<\/code>)<strong>:<\/strong> <\/p>\n<ul>\n<li>\n<p><strong>\u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u043d\u043e\u0434\u0430 \u043f\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><strong>\u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u043e\u0441\u0438;<\/p>\n<\/li>\n<li>\n<p><strong>\u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u043d\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0442\u0441\u044f, \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0443 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u043d\u043e\u0434\u044b;<\/p>\n<\/li>\n<li>\n<p><strong>\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u0442, \u043f\u043e\u0431\u0435\u0436\u0434\u0430\u0435\u0442 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u0435.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0444\u043e\u043a\u0443\u0441\u0430:<\/strong> <\/p>\n<ul>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d \u043b\u0443\u0447\u0448\u0438\u0439 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442 \u2014 \u043e\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u043d\u0435\u0442 \u0438\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u2014 \u0444\u043e\u043a\u0443\u0441 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u043c\u0435\u0441\u0442\u0435 \u0438\u043b\u0438 \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>requestFocus<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 (<code>FocusDirection<\/code>). \u041e\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 <code>FocusTransactionManager<\/code>, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441 \u0444\u043e\u043a\u0443\u0441\u043e\u043c.<\/p>\n<pre><code class=\"kotlin\">internal fun FocusTargetNode.requestFocus(focusDirection: FocusDirection): Boolean? {       return requireTransactionManager().withNewTransaction(           onCancelled = { if (node.isAttached) refreshFocusEventNodes() }       ) {           when (performCustomRequestFocus(focusDirection)) {               None -&gt; performRequestFocus()               Redirected -&gt; true               Cancelled, RedirectCancelled -&gt; null           }       }   }<\/code><\/pre>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430:<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438<\/strong> \u0447\u0435\u0440\u0435\u0437 <code>requireTransactionManager().withNewTransaction<\/code>. \u0415\u0441\u043b\u0438 \u043d\u0430\u0447\u043d\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430, \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043e\u0442\u043c\u0435\u043d\u044f\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 <\/strong>(<code>performCustomRequestFocus<\/code>): <\/p>\n<ul>\n<li>\n<p><code>None<\/code> \u2192 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0444\u043e\u043a\u0443\u0441 \u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0438\u043b\u0438 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u2192 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c\u0443 <code>performRequestFocus<\/code>;<\/p>\n<\/li>\n<li>\n<p><code>Redirected<\/code> \u2192 \u0444\u043e\u043a\u0443\u0441 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043d\u043e\u0434\u0443;<\/p>\n<\/li>\n<li>\n<p><code>Cancelled<\/code> \u0438\u043b\u0438 <code>RedirectCancelled<\/code> \u2192 \u0444\u043e\u043a\u0443\u0441 \u043e\u0442\u043c\u0435\u043d\u0451\u043d.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u0430 \u043f\u0440\u0438 \u043e\u0442\u043c\u0435\u043d\u0435:<\/strong> \u0435\u0441\u043b\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>refreshFocusEventNodes<\/code>.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose<\/h4>\n<p>\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438 \u0435\u0433\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0444\u043e\u043a\u0443\u0441\u0430:<\/p>\n<ul>\n<li>\n<p><strong>Active<\/strong> \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0430\u043a\u0442\u0438\u0432\u0435\u043d \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432\u0432\u043e\u0434\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448);<\/p>\n<\/li>\n<li>\n<p><strong>ActiveParent<\/strong> \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u0430\u043c \u043d\u0435 \u0432 \u0444\u043e\u043a\u0443\u0441\u0435, \u043d\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0435\u0433\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u043a\u0443\u0441;<\/p>\n<\/li>\n<li>\n<p><strong>Captured<\/strong> \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0430\u043a\u0442\u0438\u0432\u0435\u043d, \u043d\u043e \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0444\u043e\u043a\u0443\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0432\u0432\u043e\u0434\u0430);<\/p>\n<\/li>\n<li>\n<p><strong>Inactive<\/strong> \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438 \u0435\u0433\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432\u0432\u043e\u0434\u0430.<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/strong> \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 <code>Row<\/code> \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0432\u0435 \u043a\u043d\u043e\u043f\u043a\u0438. \u041a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441 (<code>Active<\/code>), \u0435\u0451 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c (<code>Row<\/code>) \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 <code>ActiveParent<\/code>. \u0415\u0441\u043b\u0438 \u043c\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0444\u043e\u043a\u0443\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>focusRequester.captureFocus()<\/code>, \u043a\u043d\u043e\u043f\u043a\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f <code>Captured<\/code>, \u0438 \u0444\u043e\u043a\u0443\u0441 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043d\u0430 \u043d\u0435\u0439 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043c\u044b \u044f\u0432\u043d\u043e \u043d\u0435 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u043c \u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>focusRequester.freeFocus()<\/code>.<\/p>\n<p>\u041d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/23f\/296\/08e\/23f29608e550f999d069f0ae177d9d68.gif\" width=\"960\" height=\"544\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/23f\/296\/08e\/23f29608e550f999d069f0ae177d9d68.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/23f\/296\/08e\/23f29608e550f999d069f0ae177d9d68.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0432 \u044d\u0442\u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445, \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose.<\/p>\n<h4>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0430: performCustomRequestFocus<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0434\u0430\u043d \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 <code>Modifier.focusProperties<\/code>, \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u0442\u043e, \u043a\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b focusProperties \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u044d\u0442\u0438\u043c.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0451 \u0440\u0430\u0431\u043e\u0442\u0443 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e:<\/p>\n<pre><code class=\"kotlin\">internal fun FocusTargetNode.performCustomRequestFocus(       focusDirection: FocusDirection   ): CustomDestinationResult {       when (focusState) {           Active, Captured -&gt; return None           ActiveParent -&gt;               return requireActiveChild().performCustomClearFocus(focusDirection)           Inactive -&gt; {               val focusParent = nearestAncestor(FocusTarget) ?: return None               return when (focusParent.focusState) {                   Captured -&gt; Cancelled                   ActiveParent -&gt; focusParent.performCustomRequestFocus(focusDirection)                   Active -&gt; focusParent.performCustomEnter(focusDirection)                   Inactive -&gt;                       focusParent.performCustomRequestFocus(focusDirection).takeUnless { it == None }                           ?: focusParent.performCustomEnter(focusDirection)               }           }       }   }<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u043c \u0444\u043e\u043a\u0443\u0441\u0430 \u0438 \u0440\u0435\u0448\u0430\u0435\u0442, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<ol>\n<li>\n<p><strong>\u0424\u043e\u043a\u0443\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d <\/strong>(<code>Active<\/code><strong>,<\/strong> <code>Captured<\/code>). \u0415\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u0436\u0435 \u0432 \u0444\u043e\u043a\u0443\u0441\u0435 \u0438\u043b\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0438\u043b \u0435\u0433\u043e (<code>Captured<\/code>), \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>None<\/code>. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u0442 \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 <code>performRequestFocus<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0444\u043e\u043a\u0443\u0441 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u2014 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0441 \u0444\u043e\u043a\u0443\u0441\u043e\u043c \u0443 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 <\/strong>(<code>ActiveParent<\/code>). <\/p>\n<ul>\n<li>\n<p>\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043e\u0447\u0438\u0449\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441 \u0443 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0440\u0435\u0431\u0451\u043d\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 <code>performCustomClearFocus<\/code> \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 <code>exit<\/code> \u0438\u0437 <code>focusProperties<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u043b \u0444\u043e\u043a\u0443\u0441, \u0440\u0430\u0431\u043e\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u0447\u0435\u0440\u0435\u0437 <code>performRequestFocus<\/code>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u0435\u043d <\/strong>(<code>Inactive<\/code>). \u0418\u0449\u0435\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0441 <code>FocusTarget<\/code>. \u0415\u0441\u043b\u0438 \u043e\u043d \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f <code>None<\/code>. \u0415\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043d\u0430\u0439\u0434\u0435\u043d, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p><strong>Captured<\/strong> \u2192 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0435\u0439) \u2192 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f <code>Cancelled<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>ActiveParent<\/strong> \u2192 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f, \u0435\u0441\u043b\u0438 \u0443 \u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d <code>focusProperties<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>Active<\/strong> \u2192 \u0435\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0443\u0436\u0435 \u0432 \u0444\u043e\u043a\u0443\u0441\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 <code>focusProperties.enter<\/code>. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>performCustomEnter<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>Inactive<\/strong> \u2192 \u0435\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0442\u043e\u0436\u0435 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u0435\u043d, \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0448\u0435 \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0451\u0442\u0441\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u0432\u0445\u043e\u0434\u0430 (<code>focusProperties.enter<\/code>). \u0415\u0441\u043b\u0438 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f <code>None<\/code>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h4>\u0414\u0435\u0444\u043e\u043b\u0442\u043d\u0430\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0430: performRequestFocus<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u043d\u0435\u0442 \u0438\u043b\u0438 \u043e\u043d\u0430 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0444\u043e\u043a\u0443\u0441\u0430.<\/p>\n<pre><code class=\"kotlin\">internal fun FocusTargetNode.performRequestFocus(): Boolean {      val success = when (focusState) {           Active, Captured -&gt; true           ActiveParent -&gt; clearChildFocus() &amp;&amp; grantFocus()           Inactive -&gt; {               val parent = nearestAncestor(FocusTarget)               if (parent != null) {                   val prevState = parent.focusState                   val success = parent.requestFocusForChild(this)                   if (success &amp;&amp; prevState !== parent.focusState) {                       parent.refreshFocusEventNodes()                   }                   success               } else {                   requestFocusForOwner() &amp;&amp; grantFocus()               }           }       }       if (success) refreshFocusEventNodes()       return success   }<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u043b\u043e\u0433\u0438\u043a\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u0436\u0435 \u0430\u043a\u0442\u0438\u0432\u0435\u043d \u0438\u043b\u0438 \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d <\/strong>(<code>Active<\/code>, <code>Captured<\/code>) \u2014 \u0435\u0441\u043b\u0438 \u0444\u043e\u043a\u0443\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<\/p>\n<\/li>\n<li>\n<p><strong>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u2014 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c <\/strong>(<code>ActiveParent<\/code>). <\/p>\n<ul>\n<li>\n<p>\u041e\u0447\u0438\u0449\u0430\u0435\u0442\u0441\u044f \u0444\u043e\u043a\u0443\u0441 \u0443 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 (<code>clearChildFocus<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0431\u0435\u0440\u0435\u0442 \u0444\u043e\u043a\u0443\u0441 \u0447\u0435\u0440\u0435\u0437 <code>grantFocus<\/code>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u0435\u043d (<\/strong><code><strong>Inactive<\/strong><\/code><strong>)<\/strong>. <\/p>\n<ul>\n<li>\n<p>\u0418\u0449\u0435\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0441 \u0444\u043e\u043a\u0443\u0441\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043d\u0430\u0439\u0434\u0435\u043d: <\/p>\n<ul>\n<li>\n<p><strong>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <\/strong><code><strong>requestFocusForChild<\/strong><\/code><strong>:<\/strong> \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 <code>refreshFocusEventNodes<\/code>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d: <\/p>\n<ul>\n<li>\n<p>\u0424\u043e\u043a\u0443\u0441 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0443 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 Compose View \u0447\u0435\u0440\u0435\u0437 <code>requestFocusForOwner<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u043f\u0440\u0438\u043d\u044f\u043b \u0444\u043e\u043a\u0443\u0441, \u043e\u043d \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u043c <code>grantFocus<\/code>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0444\u043e\u043a\u0443\u0441\u0430<\/strong>. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>refreshFocusEventNodes<\/code>, \u0447\u0442\u043e\u0431\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Compose \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u043d\u044b\u0445 \u043d\u043e\u0434.<\/p>\n<\/li>\n<\/ol>\n<h4>\u0418\u0442\u043e\u0433: \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Jetpack Compose<\/h4>\n<ol>\n<li>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>requestFocus<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 (<code>focusProperties<\/code>), \u043e\u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>performCustomRequestFocus<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0444\u043e\u043a\u0443\u0441 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <code>performRequestFocus<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u0437\u0430\u043f\u0440\u043e\u0441 \u0443\u0445\u043e\u0434\u0438\u0442 \u043a \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044e (<code>nearestAncestor(FocusTarget)<\/code>).<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c \u0442\u043e\u0436\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u0432\u0435\u0440\u0445 \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u0440\u0430\u0439\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0444\u043e\u043a\u0443\u0441 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0443 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 Compose View \u0447\u0435\u0440\u0435\u0437 <code>requestFocusForOwner<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>refreshFocusEventNodes<\/code> \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0444\u043e\u043a\u0443\u0441\u0430.<\/p>\n<\/li>\n<\/ol>\n<h4>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 Compose \u0432\u0435\u0440\u0441\u0438\u0438 1.8<\/h4>\n<p>\u0412 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 <strong>Compose 1.8<\/strong> \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c API \u043a\u043b\u0430\u0441\u0441\u0430 <code>FocusRequester<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>requestFocus<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"kotlin\">fun requestFocus(focusDirection: FocusDirection = Enter): Boolean =  findFocusTargetNode {       it.requestFocus(focusDirection)   }<\/code><\/pre>\n<p>\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>FocusDirection<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0435\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u043c.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u043b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430 <code>performRequestFocus()<\/code>, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f:<\/p>\n<pre><code class=\"kotlin\">private fun FocusTargetNode.performRequestFocusOptimized(): Boolean {       val focusOwner = requireOwner().focusOwner       val previousActiveNode = focusOwner.activeFocusTargetNode       val previousFocusState = focusState       if (previousActiveNode === this) {            dispatchFocusCallbacks(previousFocusState, previousFocusState)           return true       }          if (previousActiveNode?.clearFocus(refreshFocusEvents = true) == false) {           return false     }           if (previousActiveNode == null &amp;&amp; !requestFocusForOwner()) {           return false     }       grantFocus()           var previousAncestorTargetNodes: MutableVector? = null            if (previousActiveNode != null) {           previousAncestorTargetNodes = mutableVectorOf()           previousActiveNode.visitAncestors(Nodes.FocusTarget) { previousAncestorTargetNodes.add(it) }       }         val ancestorTargetNodes = mutableVectorOf()       visitAncestors(Nodes.FocusTarget) {           val removed = previousAncestorTargetNodes?.remove(it)           if (removed == null || !removed) {               ancestorTargetNodes.add(it)           }       }          previousAncestorTargetNodes?.forEachReversed {           if (focusOwner.activeFocusTargetNode !== this) {               return false           }           it.dispatchFocusCallbacks(ActiveParent, Inactive)       }               ancestorTargetNodes.forEachReversed {           if (focusOwner.activeFocusTargetNode !== this) {               return false           }           it.dispatchFocusCallbacks(Inactive, ActiveParent)       }          if (focusOwner.activeFocusTargetNode !== this) {           return false       }          dispatchFocusCallbacks(previousFocusState, Active)          if (focusOwner.activeFocusTargetNode !== this) {           return false       }          @OptIn(ExperimentalComposeUiApi::class, InternalComposeUiApi::class)       if (ComposeUiFlags.isViewFocusFixEnabled &amp;&amp; requireLayoutNode().getInteropView() == null) {            requireOwner().focusOwner.requestFocusForOwner(FocusDirection.Next, null)       }          return true   }<\/code><\/pre>\n<p><strong>\u0420\u0430\u0437\u0431\u043e\u0440 \u043b\u043e\u0433\u0438\u043a\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430<\/strong>. <\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f <code>focusOwner<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438 Compose.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043d\u043e\u0434\u0430 (<code>previousActiveNode<\/code>) \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u0430 (<code>previousFocusState<\/code>).<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u043e\u043a\u0443\u0441\u0430<\/strong>. \u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043d\u043e\u0434\u0430 (<code>this<\/code>) \u0443\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0444\u043e\u043a\u0443\u0441\u0435 (<code>previousActiveNode === this<\/code>),  \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 (<code>dispatchFocusCallbacks<\/code>), \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0447\u0438\u0441\u0442\u043a\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u0443 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/strong>. \u0415\u0441\u043b\u0438 \u0443 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043d\u043e\u0434\u044b (<code>previousActiveNode<\/code>) \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441 (<code>clearFocus(refreshFocusEvents = true) == false<\/code>), \u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u0444\u043e\u043a\u0443\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<\/li>\n<li>\n<p><strong>\u0417\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0443 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 <\/strong>(<code>focusOwner<\/code>). <\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 (<code>previousActiveNode == null<\/code>), \u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>requestFocusForOwner()<\/code>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u0443 ComposeView.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0435 \u0443\u0434\u0430\u043b\u0441\u044f, \u0442\u043e \u043d\u043e\u0432\u044b\u0439 \u0444\u043e\u043a\u0443\u0441 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443<\/strong> (<code>grantFocus<\/code>). \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0448\u0430\u0433\u0438 \u043f\u0440\u043e\u0448\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>grantFocus()<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u0430 Active \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043d\u043e\u0434\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0443\u0437\u043b\u043e\u0432<\/strong>. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u043a\u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u043b\u0438 \u0438\u043c\u0435\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u0430. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043b\u0438 \u043e\u043d \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c (<code>ActiveParent<\/code>) \u0438\u043b\u0438 \u0441\u0442\u0430\u043b \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u043a\u043e\u0432<\/strong>. <\/p>\n<ul>\n<li>\n<p>\u0423\u0437\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0438 \u0441\u0442\u0430\u0442\u0443\u0441 <code>ActiveParent<\/code>, \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 <code>Inactive<\/code>, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u043a\u0443\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043a\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0438\u0437 <code>Inactive<\/code> \u0432 <code>ActiveParent<\/code>, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u0444\u043e\u043a\u0443\u0441.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0444\u043e\u043a\u0443\u0441\u0430<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 <code>dispatchFocusCallbacks<\/code> \u0444\u043e\u043a\u0443\u0441 \u0431\u044b\u043b \u0441\u0431\u0440\u043e\u0448\u0435\u043d \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u043e\u0432\u043e\u043c\u0443 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u0443\u0437\u043b\u0443<\/strong> \u2014 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>dispatchFocusCallbacks(previousFocusState, Active)<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e \u0441\u043c\u0435\u043d\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u0443 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043d\u043e\u0434\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0434\u043b\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0431\u0435\u0437 <\/strong><code>AndroidView<\/code> \u2014 \u0435\u0441\u043b\u0438 \u043d\u043e\u0434\u0430 <strong>\u043d\u0435<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <code>AndroidView<\/code>, \u043d\u043e Compose-\u0444\u043b\u0430\u0433 <code>isViewFocusFixEnabled<\/code> \u0430\u043a\u0442\u0438\u0432\u0435\u043d (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443 \u0432\u043a\u043b\u044e\u0447\u0435\u043d), \u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>requestFocusForOwner(FocusDirection.Next, null)<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u0432 ComposeView.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u044d\u0442\u0430\u043f\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>true<\/code>, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0444\u043e\u043a\u0443\u0441.<\/p>\n<\/li>\n<\/ol>\n<h3>\u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c?<\/h3>\n<ul>\n<li>\n<p><strong>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u0430 \u043f\u043e \u0434\u0435\u0440\u0435\u0432\u0443 \u0444\u043e\u043a\u0443\u0441\u0430 <\/strong>(diff-\u043b\u043e\u0433\u0438\u043a\u0430) \u2014 \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e <strong>\u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435<\/strong> \u0432 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u0441 <\/strong><code>AndroidView<\/code>: <\/p>\n<ul>\n<li>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438 \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e <code>AndroidView<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u043a\u0440\u0430\u0448\u0430\u043c, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0438\u043a\u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 <code>requestFocus()<\/code> \u2014 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <code>previouslyFocusedRect<\/code>, \u0447\u0442\u043e \u0443\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 <code>ComposeView<\/code> \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 IME \u2014 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u044b \u043a\u0440\u0430\u0448\u0438, \u043a\u043e\u0433\u0434\u0430 IME \u043f\u044b\u0442\u0430\u043b\u0430\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u043d\u0430 <code>ComposeView<\/code>, \u043d\u0435 \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0424\u043e\u043a\u0443\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u0442\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 (detaching) <code>AndroidView<\/code> \u2014 \u0440\u0430\u043d\u044c\u0448\u0435 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f (attaching) \u043e\u043d \u043c\u043e\u0433 \u0441\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435, \u044d\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043a\u0440\u0430\u0439\u043d\u0435 \u0432\u0430\u0436\u043d\u044b\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u043e \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u043e\u043a\u0443\u0441\u0430\u043c\u0438. \u041d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 PREMIER \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u043e\u0441\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u0440\u0430\u0448\u0435\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u043e\u0439. \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p><a class=\"anchor\" name=\"outro\" id=\"outro\"><\/a><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Jetpack Compose, \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e UI, \u043d\u043e \u0438 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0437\u0430\u0434\u0430\u0447, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u043d\u0430 \u0422\u0412-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u043c\u0438 \u0432\u0432\u043e\u0434\u0430. \u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0442\u043e\u0447\u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u0438 \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c.<\/p>\n<p>\u0421 \u0432\u044b\u0445\u043e\u0434\u043e\u043c Compose 1.8 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0442\u0430\u043b \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u043c \u0437\u0430 \u0441\u0447\u0451\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c <code>FocusDirection<\/code> \u0432 <code>requestFocus()<\/code>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0443\u0447\u0448\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u043e\u0439.<\/p>\n<blockquote>\n<p><em>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0440\u0430\u0437\u0431\u043e\u0440 \u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u043f\u043e Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435, \u044f \u0437\u0430\u0432\u0451\u043b <\/em><a href=\"https:\/\/t.me\/mobile_type\"><em>telegram-\u043a\u0430\u043d\u0430\u043b<\/em><\/a><em>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0434\u0435\u043b\u044e\u0441\u044c \u0442\u0440\u0435\u043d\u0434\u0430\u043c\u0438, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u0438 \u043b\u0438\u0447\u043d\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c. <\/em><\/p>\n<p><em>\u041f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u0433 \u0438 \u043a\u0430\u043d\u0430\u043b\u00a0<\/em><a href=\"https:\/\/t.me\/smotrizait\"><em>\u0421\u043c\u043e\u0442\u0440\u0438 \u0437\u0430 IT<\/em><\/a><em>, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043c\u0435\u0434\u0438\u0430\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432: \u0432 \u043d\u0438\u0445 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b \u0426\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u00ab\u0413\u0430\u0437\u043f\u0440\u043e\u043c-\u041c\u0435\u0434\u0438\u0430 \u0425\u043e\u043b\u0434\u0438\u043d\u0433\u0430\u00bb \u0442\u0430\u043a\u0438\u0445, \u043a\u0430\u043a PREMIER, RUTUBE, Yappy \u0434\u0435\u043b\u044f\u0442\u0441\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0438 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c. \u0414\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445!<\/em><\/p>\n<\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/902306\/\"> https:\/\/habr.com\/ru\/articles\/902306\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041a\u043e\u0441\u0442\u044f, \u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0435 PREMIER. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c PREMIER \u0434\u043b\u044f Android TV \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 Jetpack Compose \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0438 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u0442\u0435\u043c\u0430. \u0410 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u043e, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445 \u0432\u0440\u043e\u0434\u0435 \u0422\u0412-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0431\u0435\u0437 \u0441\u0435\u043d\u0441\u043e\u0440\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0442\u0435\u043c\u0443 \u0444\u043e\u043a\u0443\u0441\u043e\u0432 \u0432 Compose \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u043e\u0447\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0442\u0438\u043f\u0438\u0447\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0424\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u0432 Jetpack Compose \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u0435\u0436\u0434\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0417\u0430 \u044d\u0442\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0441\u0442\u043e\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u043e\u0434, \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442, \u043a\u0430\u043a\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<p>\u0412 <a href=\"https:\/\/habr.com\/ru\/companies\/habr_rutube\/articles\/902310\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 Compose \u0438 \u0442\u043e, \u043a\u0430\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0444\u043e\u043a\u0443\u0441\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0433\u043b\u0443\u0431\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438: \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <code>requestFocus()<\/code>, \u043a\u0430\u043a Compose \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0432\u043d\u0435\u0441\u0435\u043d\u044b \u0432 Compose 1.8, \u0447\u0442\u043e\u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u043e\u0434 Android TV, \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0444\u043e\u043a\u0443\u0441\u043e\u0432, \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441.<\/p>\n<p><strong>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"#requestFocus\">\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose<\/a> <\/p>\n<ul>\n<li>\n<p>\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043d\u043e\u0434\u0430\u043c\u0438 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 FocusRequester<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#Mechanism\">\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 Compose<\/a><\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 Compose \u0432\u0435\u0440\u0441\u0438\u0438 1.8<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#outro\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"requestFocus\" id=\"requestFocus\"><\/a><\/p>\n<h3>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432 Compose<\/h3>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>requestFocus()<\/code>, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u043e\u043a\u0443\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0437\u0430 \u044d\u0442\u0438\u043c \u0441\u0442\u043e\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c. Compose \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043c\u043e\u0436\u0435\u0442 \u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u043a\u0430\u043a \u044d\u0442\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438 \u043a\u0430\u043a\u043e\u0439 \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0444\u043e\u043a\u0443\u0441\u0430 \u0432\u044b\u0431\u0440\u0430\u0442\u044c. \u0414\u0430\u0432\u0430\u0439 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0438 \u043a\u0430\u043a\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435.<\/p>\n<h4>\u0412\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043d\u043e\u0434\u0430\u043c\u0438 \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438<\/h4>\n<p>\u0412 Jetpack Compose \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u0432\u0438\u0434\u0435 <strong>\u043d\u043e\u0434\u044b<\/strong> (<strong>Node<\/strong>). \u042d\u0442\u0438 \u043d\u043e\u0434\u044b \u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 <strong>UI-\u0434\u0435\u0440\u0435\u0432\u043e<\/strong> \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u0437\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430:<\/p>\n<ul>\n<li>\n<p><strong>\u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435<\/strong> \u2014 <code>LayoutNode<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0432\u0432\u043e\u0434\u0430 \u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439<\/strong> \u2014 <code>ModifierNode<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>\u0444\u043e\u043a\u0443\u0441 \u0438 \u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435<\/strong> \u2014 <code>FocusTargetNode<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>\u043e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/strong> \u2014 <code>DrawNode<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>Modifier.focusTarget<\/code>, Compose \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0444\u043e\u043a\u0443\u0441-\u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441. \u0410\u00a0\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <code>Modifier.focusRequester<\/code> \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0434\u0443 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c <code>FocusRequester<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0444\u043e\u043a\u0443\u0441\u0430.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0433\u043b\u0443\u0431\u0436\u0435 \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043d\u043e\u0434, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e <a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\/phases\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e Android \u043f\u043e \u0444\u0430\u0437\u0430\u043c Compose<\/a> \u2014 \u0442\u0430\u043c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u044b \u044d\u0442\u0430\u043f\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f UI-\u0434\u0435\u0440\u0435\u0432\u0430.<\/p>\n<h4>\u0417\u0430\u043f\u0440\u043e\u0441 \u0444\u043e\u043a\u0443\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 FocusRequester<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <code>FocusRequester<\/code>. \u041e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u00ab\u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a\u00bb \u043c\u0435\u0436\u0434\u0443 \u0444\u043e\u043a\u0443\u0441-\u043d\u043e\u0434\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0432 Compose.<\/p>\n<p>\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"kotlin\">val focusRequester = FocusRequester()  TextField(     value = text,     onValueChange = { text = it },     modifier = Modifier         .focusRequester(focusRequester)         .focusTarget() )  Button(onClick = { focusRequester.requestFocus() }) {     Text(\"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u043e\u043a\u0443\u0441\") }<\/code><\/pre>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>FocusRequester<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>Modifier.focusRequester<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c <code>Modifier.focusTarget<\/code>, \u0447\u0442\u043e\u0431\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0433 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>focusRequester.requestFocus()<\/code>, \u0438 \u0444\u043e\u043a\u0443\u0441 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 <code>TextField<\/code>.<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u26a0\ufe0f <strong>\u0412\u0430\u0436\u043d\u043e:<\/strong> \u0415\u0441\u043b\u0438 <code>FocusRequester<\/code> \u043d\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043d\u043e\u0434\u0435 \u0447\u0435\u0440\u0435\u0437 <code>focusRequester<\/code>, \u0432\u044b\u0437\u043e\u0432 <code>requestFocus()<\/code> \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<\/blockquote>\n<h4>\u0427\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c<\/h4>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c <code>requestFocus()<\/code>, Compose \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p><strong>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0434\u0435\u0440\u0435\u0432 \u043d\u043e\u0434<\/strong> \u2014 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0430\u044f \u0444\u043e\u043a\u0443\u0441-\u043d\u043e\u0434\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441 <code>FocusRequester<\/code>;<\/p>\n<\/li>\n<li>\n<p><strong>\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u0430<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <code>onFocusChanged<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p><strong>\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 \u0444\u043e\u043a\u0443\u0441\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442<\/strong> \u2014 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0444\u043e\u043a\u0443\u0441\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0442\u0435\u0440\u044f\u0435\u0442 \u0444\u043e\u043a\u0443\u0441 (\u0435\u0441\u043b\u0438 \u043e\u043d \u0431\u044b\u043b \u0430\u043a\u0442\u0438\u0432\u0435\u043d), \u0430 \u043d\u043e\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0435\u0433\u043e;<\/p>\n<\/li>\n<li>\n<p><strong>\u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442 UI<\/strong> \u2014 Compose \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0438\u0442 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0440\u0430\u043c\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0444\u043e\u043a\u0443\u0441 \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u2014 \u043b\u0438\u0431\u043e \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043a\u043d\u043e\u043f\u043a\u0438, \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e? \u041f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u0438 \u0440\u0430\u0431\u043e\u0442\u044b <code>FocusRequester<\/code> \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432:<\/p>\n<ul>\n<li>\n<p><strong>\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0430\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f<\/strong>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0422\u0412 \u0438\u043b\u0438 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u0430\u0445;<\/p>\n<\/li>\n<li>\n<p><strong>\u0444\u043e\u0440\u043c\u044b \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f<\/strong> \u2014 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044e \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p><strong>\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c<\/strong> \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0434\u043b\u044f screen reader&#8217;\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c, \u043a\u0430\u043a \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0444\u043e\u043a\u0443\u0441\u0430 \u044d\u0432\u043e\u043b\u044e\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u0432 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Compose \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0434\u043e 1.7 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 1.8. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0444\u043e\u043a\u0443\u0441 \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0431\u044f \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e \u0438 \u043a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p><a class=\"anchor\" name=\"Mechanism\" id=\"Mechanism\"><\/a><\/p>\n<h3>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u043d\u0430 Compose<\/h3>\n<h4>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 requestFocus()<\/h4>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0432\u044b\u0437\u043e\u0432 <code>requestFocus()<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<pre><code class=\"kotlin\">fun requestFocus() {       focus()   }<\/code><\/pre>\n<p>\u041d\u043e \u0437\u0430 \u044d\u0442\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0441\u043a\u0440\u044b\u0442\u0430 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0449\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u043d\u043e\u0434\u0443 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430.<\/p>\n<h4>\u0412\u044b\u0437\u043e\u0432 focus()<\/h4>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>requestFocus()<\/code> \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>focus()<\/code>. \u0412\u043e\u0442 \u043a\u0430\u043a \u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442:<\/p>\n<pre><code class=\"kotlin\">internal fun focus(): Boolean = findFocusTargetNode { it.requestFocus() }<\/code><\/pre>\n<p><strong>\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f focus():<\/strong><\/p>\n<ul>\n<li>\n<p>\u0438\u0449\u0435\u0442 \u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441;<\/p>\n<\/li>\n<li>\n<p>\u0435\u0441\u043b\u0438 \u043d\u043e\u0434\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0443 \u043d\u0435\u0451 <code>requestFocus<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>true<\/code>, \u0435\u0441\u043b\u0438 \u0444\u043e\u043a\u0443\u0441 \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e Compose \u0438\u0449\u0435\u0442 \u044d\u0442\u0443 \u043d\u043e\u0434\u0443.<\/p>\n<h4>FocusableNode \u0438 FocusTargetModifierNode<\/h4>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 \u2014 \u044d\u0442\u043e <strong>FocusableNode<\/strong>. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u043e\u0434\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0444\u043e\u043a\u0443\u0441.<\/p>\n<pre><code class=\"kotlin\">internal class FocusableNode(       interactionSource: MutableInteractionSource?   ) : DelegatingNode(), FocusEventModifierNode, SemanticsModifierNode,       GlobalPositionAwareModifierNode, FocusRequesterModifierNode {        ...        init {           delegate(FocusTargetModifierNode())       }          ...     <\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/strong><\/p>\n<ul>\n<li>\n<p>\u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u043e\u0434\u0430 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u0443\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u043e\u043a\u0443\u0441\u043e\u043c \u0447\u0435\u0440\u0435\u0437 <code>FocusTargetModifierNode<\/code>;<\/p>\n<\/li>\n<li>\n<p>\u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0444\u043e\u043a\u0443\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 <code>Modifier.focusable()<\/code> \u0438\u043b\u0438 <code>Modifier.focusTarget()<\/code>);<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438 Compose \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0430\u043c \u043f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043d\u043e\u0434\u044b.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>findFocusTargetNode<\/code> \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"kotlin\">internal fun findFocusTargetNode(onFound: (FocusTargetNode) -&gt; Boolean): Boolean {       @OptIn(ExperimentalComposeUiApi::class)       return findFocusTarget { focusTarget -&gt;           if (focusTarget.fetchFocusProperties().canFocus) {               onFound(focusTarget)           } else {               focusTarget.findChildCorrespondingToFocusEnter(Enter, onFound)           }       }   }<\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430<\/strong> \u2014 \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043d\u043e\u0434\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 <code>FocusRequester<\/code>, \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 canFocus.<\/strong> \u0415\u0441\u043b\u0438 \u0443 \u043d\u043e\u0434\u044b <code>canFocus = true<\/code>, \u043e\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0438\u0441\u043a \u0441\u0440\u0435\u0434\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/strong> \u0415\u0441\u043b\u0438 \u043d\u043e\u0434\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, \u043f\u043e\u0438\u0441\u043a \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u0438 \u0435\u0451 \u043f\u043e\u0442\u043e\u043c\u043a\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>findChildCorrespondingToFocusEnter<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u043e\u0431\u0445\u043e\u0434.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043d\u043e\u0434\u044b: findFocusTarget<\/h4>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>findFocusTarget<\/code> \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0432\u0441\u0435\u043c \u043d\u043e\u0434\u0430\u043c, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u0441 <code>FocusRequester<\/code>, \u0438\u00a0\u0438\u0449\u0435\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0434\u043b\u044f \u0444\u043e\u043a\u0443\u0441\u0430:<\/p>\n<pre><code class=\"kotlin\">private inline fun findFocusTarget(onFound: (FocusTargetNode) -&gt; Boolean): Boolean {       check(this !== Default) { InvalidFocusRequesterInvocation }       check(this !== Cancel) { InvalidFocusRequesterInvocation }       check(focusRequesterNodes.isNotEmpty()) { FocusRequesterNotInitialized }       var success = false       focusRequesterNodes.forEach { node -&gt;           node.visitChildren(Nodes.FocusTarget) {               if (onFound(it)) {                   success = true                   return@forEach               }           }       }    return success   }<\/code><\/pre>\n<p><strong>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0448\u0430\u0433\u0438:<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438:<\/strong> \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0443 <code>FocusRequester<\/code> \u0435\u0441\u0442\u044c \u043d\u043e\u0434\u044b, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u0445\u043e\u0434 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043d\u043e\u0434:<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>visitChildren<\/code> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0445\u0435:<\/strong> \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430 \u043d\u043e\u0434\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u043e\u043a\u0443\u0441, \u043e\u0431\u0445\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043d\u043e\u0434\u0430 \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442? \u0422\u043e\u0433\u0434\u0430 \u0432 \u0445\u043e\u0434 \u0438\u0434\u0451\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>findChildCorrespondingToFocusEnter<\/code>.<\/p>\n<h4>\u041f\u043e\u0438\u0441\u043a \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430: findChildCorrespondingToFocusEnter<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u043d\u043e\u0434\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0444\u043e\u043a\u0443\u0441, Compose \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430 \u0441\u0440\u0435\u0434\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<pre><code class=\"kotlin\">internal fun FocusTargetNode.findChildCorrespondingToFocusEnter(       direction: FocusDirection,       onFound: (FocusTargetNode) -&gt; Boolean   ): Boolean {          val focusableChildren = MutableVector()       collectAccessibleChildren(focusableChildren)          if (focusableChildren.size &lt;= 1) {           return focusableChildren.firstOrNull()?.let { onFound.invoke(it) } ?: false       }   val requestedDirection = when (direction) {         @OptIn(ExperimentalComposeUiApi::class)           Enter -&gt; Right           else -&gt; direction       }           val initialFocusRect = when (requestedDirection) {           Right, Down -&gt; focusRect().topLeft()           Left, Up -&gt; focusRect().bottomRight()           else -&gt; error(InvalidFocusDirection)       }       val nextCandidate = focusableChildren.findBestCandidate(initialFocusRect, requestedDirection)       return nextCandidate?.let { onFound.invoke(it) } ?: false   }<\/code><\/pre>\n<p><strong>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u0430:<\/strong><\/p>\n<pre><code class=\"kotlin\">internal fun FocusTargetNode.findChildCorrespondingToFocusEnter(       direction: FocusDirection,       onFound: (FocusTargetNode) -&gt; Boolean   ): Boolean {       val focusableChildren = MutableVector()       collectAccessibleChildren(focusableChildren)      if (focusableChildren.size &lt;= 1) {           return<\/code><\/pre>\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-460619","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/460619","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=460619"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/460619\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=460619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=460619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=460619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}