{"id":406113,"date":"2024-06-29T18:43:52","date_gmt":"2024-06-29T18:43:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=406113"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-06-29T18:43:52","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=406113","title":{"rendered":"<span>One UI \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445<\/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>One UI \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0436\u0435 \u043a\u0430\u043a 3 \u0433\u043e\u0434\u0430 (\u0441 2018), \u0430 \u0443\u0440\u043e\u043a\u043e\u0432 \u043f\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0434\u0438\u0437\u0430\u0439\u043d, \u0432 \u043c\u0438\u0440\u0435 android, \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b. \u041d\u0435 \u043f\u043e\u0440\u044f\u0434\u043e\u043a\u2026 \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0436\u0435, \u043c\u044b \u043d\u0430\u0447\u043d\u0451\u043c \u043f\u0440\u043e\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u044f\u0436\u0451\u043b\u044b\u0439 \u0438 \u0442\u0435\u0440\u043d\u0438\u0441\u0442\u044b\u0439 \u043f\u0443\u0442\u044c.<\/p>\n<h2>\u0417\u0430\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u0435 Siesta<\/h2>\n<p>\u042f \u0434\u0443\u043c\u0430\u044e, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e One UI. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u044f \u0431\u0443\u0434\u0443 \u0438\u043c\u0435\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 (\u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e One UI &#8212; Siesta) \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u0441\u0442\u0440\u0430\u0434\u0430\u043d\u0438\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u0414\u0430, \u044d\u0442\u043e \u043d\u0435 \u043a\u043e\u043f\u0438\u044f Samsung \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 (\u043f\u0440\u044f\u043c \u0441\u043e\u0432\u0441\u0435\u043c), \u043d\u043e \u043d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c \u2013 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u0438\u0434\u0435\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0440\u0443\u043a\u043e\u0439, \u0430 \u043d\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0440\u0438\u0444\u0442\u044b \u0438 \u0438\u043a\u043e\u043d\u043a\u0438\u2026<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/184\/48a\/290\/18448a29014a0022eac1abf7aea3e20a.gif\" width=\"406\" height=\"866\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/184\/48a\/290\/18448a29014a0022eac1abf7aea3e20a.gif\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0418\u0434\u0435\u044f One UI<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0432 OneUI.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/3b5\/931\/868\/3b5931868138b192af002e1d64b32c01.jpg\" width=\"623\" height=\"424\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3b5\/931\/868\/3b5931868138b192af002e1d64b32c01.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0437\u043e\u043d\u044b, \u0433\u0434\u0435 1\/3 \u044d\u043a\u0440\u0430\u043d\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0442\u044f\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0438\u0435 \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430. \u0417\u0430\u0442\u0435\u043c \u0438\u0434\u0451\u0442 2-\u0430\u044f \u0437\u043e\u043d\u0430, \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0451 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d, \u044d\u0442\u0430 \u0437\u043e\u043d\u0430 \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u0442 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0430\u0433\u043d\u0438\u0447\u0435\u043d\u0430, \u0434\u0430\u0431\u044b \u043d\u0435 \u0443\u043b\u0435\u0442\u0435\u0442\u044c \u0437\u0430 \u0435\u0433\u043e \u043a\u0440\u0430\u044f. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0437\u043e\u043d\u0443 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>\u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c <u>\u0433\u043b\u0430\u0432\u043d\u0430\u044f<\/u> \u0438\u0434\u0435\u044f OneUI \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0443\u043a\u0430\u0436\u0435\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f Android 8.0, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 TextView \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c AutoSize \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 Android \u2013 \u043d\u0435 \u0431\u0435\u0434\u0430. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445.<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 Android<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c48\/ae8\/a63\/c48ae8a635519a32c7a4b14e84534f70.png\" alt=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 Android Studio\" title=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 Android Studio\" width=\"1360\" height=\"930\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c48\/ae8\/a63\/c48ae8a635519a32c7a4b14e84534f70.png\"\/><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 Android Studio<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c8a\/f1c\/b65\/c8af1cb6554bb08e8927c9408998dadb.png\" alt=\"https:\/\/www.appbrain.com\/stats\/top-android-sdk-versions\" title=\"https:\/\/www.appbrain.com\/stats\/top-android-sdk-versions\" width=\"1325\" height=\"622\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c8a\/f1c\/b65\/c8af1cb6554bb08e8927c9408998dadb.png\"\/><figcaption>https:\/\/www.appbrain.com\/stats\/top-android-sdk-versions<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/086\/3ef\/080\/0863ef08058a340ca9847e7e750b570e.png\" alt=\"\" title=\"\" width=\"1127\" height=\"812\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/086\/3ef\/080\/0863ef08058a340ca9847e7e750b570e.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>Frontend &#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u043e\u043d<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043f\u0443\u0441\u0442\u043e\u0435 Activity. \u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f RelativeLayout, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d \u043d\u0430 ScrollView. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0430\u043c ScrollView. \u0412 ScrollView \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u044d\u0442\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f LinearLayout, \u0442.\u043a. \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044f \u0432\u0441\u0442\u0430\u0432\u0438\u043b \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043e \u0447\u0451\u043c \u0438\u0434\u0451\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;RelativeLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:tools=\"http:\/\/schemas.android.com\/tools\"     android:layout_width=\"match_parent\"     android:layout_height=\"match_parent\"     tools:context=\".MainActivity\">  &lt;!--\u043c\u0435\u0441\u0442\u043e 2 \u0437\u043e\u043d\u044b-->     &lt;RelativeLayout         android:layout_width=\"match_parent\"         android:layout_height=\"50dp\">      &lt;\/RelativeLayout>  &lt;!--\u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f 1 \u0438 3 \u0437\u043e\u043d\u0430-->     &lt;ScrollView         android:id=\"@+id\/scrollView\"         android:layout_width=\"match_parent\"         android:layout_height=\"match_parent\">          &lt;LinearLayout             android:id=\"@+id\/scrollLinearLayout\"             android:layout_width=\"match_parent\"             android:layout_height=\"match_parent\"             android:orientation=\"vertical\">          &lt;\/LinearLayout>     &lt;\/ScrollView> &lt;\/RelativeLayout><\/code><\/pre>\n<h2>1 \u0437\u043e\u043d\u0430 &#8212; theBigText<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0435\u043a\u0441\u0442. \u0414\u0430\u0434\u0438\u043c \u0435\u043c\u0443 id, \u0441\u0442\u0440\u043e\u0433\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0432 250dp, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 autoSizeTextType=\u201duniform\u201d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430, gravity=\u201dcenter\u201d \u0434\u043b\u044f \u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0430\u0440\u0443 padding\u2019\u043e\u0432 \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b \u0438 \u0436\u0438\u0440\u043d\u044b\u0439 \u0448\u0440\u0438\u0444\u0442.<\/p>\n<pre><code class=\"xml\">&lt;TextView \u00a0\u00a0\u00a0 android:id=\"@+id\/theBigText\" \u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0 android:layout_height=\"250dp\" \u00a0\u00a0\u00a0 android:autoSizeTextType=\"uniform\" \u00a0\u00a0\u00a0 android:gravity=\"center\" \u00a0\u00a0\u00a0 android:paddingHorizontal=\"50dp\" \u00a0\u00a0\u00a0 android:paddingTop=\"100dp\" \u00a0\u00a0\u00a0 android:paddingBottom=\"30dp\" \u00a0\u00a0\u00a0 android:text=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\" \u00a0\u00a0\u00a0 android:textStyle=\"bold\"\/><\/code><\/pre>\n<h2>2 \u0437\u043e\u043d\u0430 &#8212; &#171;\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f&#187;<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0448\u0443 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c id, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u0433\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0432 50dp, orientation=\u201dhorizontal\u201d \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 layout_marginTop=\u201d250dp\u201d (\u0432 \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0440\u043e\u0432\u043d\u043e \u043f\u043e\u0434 \u043d\u0438\u043c). \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a theBigText, \u0442.\u043a. \u043e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c ScrollView, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0448\u0443 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d. \u0412\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0451 TextView \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0434\u043b\u044f \u043d\u0435\u0451 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b: gravity=\u201dcenter_vertical\u201d, textSize=\u201d30sp\u201d \u0438 alpha=\u201d0\u201d (\u0432\u0435\u0434\u044c \u0442\u0435\u043a\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0438\u0434\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0435\u043d\u0430 \u0432\u0432\u0435\u0440\u0445)<\/p>\n<p>ImageView: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432 40dp, gravity=\u201dcenter_vertical\u201d, alpha=\u201d0.7\u201d, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a\u043e\u043c\u043f\u0430\u0441\u0430 \u0438 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043c \u043a \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u043a\u0440\u0430\u043d\u0430. <\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0432\u0441\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout     android:id=\"@+id\/panel\"     android:layout_width=\"match_parent\"     android:layout_height=\"50dp\"     android:layout_marginTop=\"250dp\"     android:background=\"@color\/white\"     android:orientation=\"horizontal\">      &lt;TextView         android:id=\"@+id\/panelText\"         android:layout_width=\"wrap_content\"         android:layout_height=\"match_parent\"         android:gravity=\"center_vertical\"         android:paddingStart=\"20dp\"         android:text=\"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\"         android:textSize=\"30sp\"         android:alpha=\"0\" \/>      &lt;ImageView         android:id=\"@+id\/compassIcon\"         android:layout_width=\"40dp\"         android:layout_height=\"match_parent\"         android:layout_alignParentEnd=\"true\"         android:layout_marginEnd=\"20dp\"         android:gravity=\"center_vertical\"         android:src=\"@drawable\/compas\"         android:alpha=\"0.7\" \/> &lt;\/RelativeLayout><\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u041d\u0430\u0448\u0430 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u201d \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u0441\u0442\u043e, \u0430 \u0435\u0441\u043b\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043b\u044e\u0431\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 ScrollView, \u0442\u043e \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0443\u0441\u0442\u043e\u0439 View, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u044a\u0435\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u043d\u0430\u043c \u043f\u043e\u0434 2-\u0443\u044e \u0437\u043e\u043d\u0443 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<pre><code class=\"xml\">&lt;View \u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0 android:layout_height=\"80dp\" \/><\/code><\/pre>\n<h2>3 \u0437\u043e\u043d\u0430 &#8212; \u043a\u043e\u043d\u0442\u0435\u043d\u0442<\/h2>\n<p>\u0424\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e Activity \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043d. \u0422\u0435\u043f\u0435\u0440\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e 3-\u0439 \u0437\u043e\u043d\u044b. \u0417\u043e\u043d\u044b \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u041d\u0430 1-\u043c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u043e\u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u201c\u0441\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432\u201d, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 LayoutResource \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c \u201cblock\u201d. \u041e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0431\u044d\u043a\u0435\u043d\u0434, \u043b\u0438\u0448\u044c xml \u0444\u0430\u0439\u043b.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f74\/1e3\/a86\/f741e3a866fd151405ce480406284944.png\" width=\"624\" height=\"283\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f74\/1e3\/a86\/f741e3a866fd151405ce480406284944.png\"\/><figcaption><\/figcaption><\/figure>\n<p>CardView \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u043f\u043e\u0434 \u043d\u0430\u0448 \u0431\u043b\u043e\u043a \u043a\u0430\u043a \u043d\u0438\u043a\u0442\u043e \u043b\u0443\u0447\u0448\u0435! \u0414\u0430\u0434\u0438\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b CardView \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0433\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0445\u043e\u0436\u0438 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0438\u0445 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;androidx.cardview.widget.CardView android:id=\"@+id\/cardView\" \u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0 android:layout_height=\"80dp\" \u00a0\u00a0\u00a0 android:layout_margin=\"8dp\" \u00a0\u00a0\u00a0 app:cardCornerRadius=\"20dp\" \u00a0\u00a0\u00a0 app:cardElevation=\"20dp\" \u00a0\u00a0\u00a0 xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\" \u00a0\u00a0\u00a0 xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\">  \u00a0\u00a0\u00a0 &lt;LinearLayout \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_height=\"match_parent\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:orientation=\"horizontal\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:weightSum=\"3\">  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;ImageView \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:id=\"@+id\/image\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_width=\"60dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_height=\"60dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_gravity=\"center\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_marginVertical=\"20dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_marginStart=\"10dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:alpha=\"0.7\" \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;TextView \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:id=\"@+id\/text\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_height=\"match_parent\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_margin=\"10dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:textSize=\"22sp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:textStyle=\"bold\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:alpha=\"0.7\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:gravity=\"left|center_vertical\" \/> \u00a0\u00a0\u00a0 &lt;\/LinearLayout> &lt;\/androidx.cardview.widget.CardView><\/code><\/pre>\n<p>\u0421 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u043e\u043c \u043f\u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443!<\/p>\n<h2>Backend<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434 setContentView \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0412\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0432 \u043a\u043e\u0434.<\/p>\n<pre><code class=\"kotlin\">class MainActivity : AppCompatActivity() { \u00a0\u00a0\u00a0 override fun onCreate(savedInstanceState: Bundle?) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 super.onCreate(savedInstanceState) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 supportActionBar?.hide()\/\/\u0423\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0431\u0430\u0440 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)\/\/\u0421\u0442\u0430\u0432\u0438\u0442 \u0441\u0432\u0435\u0442\u043b\u0443\u044e \u0442\u0435\u043c\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 window.navigationBarColor = resources.getColor(R.color.black)\/\/\u0421\u0442\u0430\u0432\u0438\u0442 \u0447\u0451\u0440\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 setContentView(R.layout.activity_main) \u00a0\u00a0\u00a0 } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/p>\n<pre><code class=\"kotlin\">private lateinit var scrollView: ScrollView private lateinit var panel: RelativeLayout private lateinit var panelText: TextView private lateinit var theBigText: TextView private lateinit var compassIcon: ImageView private lateinit var scrollLinearLayout: LinearLayout<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 setContentView \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/p>\n<pre><code class=\"kotlin\">scrollView = findViewById(R.id.scrollView) panel = findViewById(R.id.panel) panelText = findViewById(R.id.theBigText) theBigText = findViewById(R.id.panelText) compassIcon = findViewById(R.id.compassIcon) scrollLinearLayout = findViewById(R.id.scrollLinearLayout)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c MarginTop \u043d\u0430\u0448\u0435\u0439 \u201c\u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d \u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u044f\u0445, \u0442.\u043a. \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 maxScroll.<\/p>\n<pre><code class=\"kotlin\">private var maxScroll = 0 private var scrollY = 0<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0430\u043c \u043e\u0442\u0441\u0442\u0443\u043f<\/p>\n<pre><code class=\"kotlin\">val params = \u00a0\u00a0\u00a0 panel.layoutParams as ViewGroup.MarginLayoutParams\/\/\u0412\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0441\u043a\u0440\u043e\u043b\u043b \u0434\u043b\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 maxScroll = params.topMargin<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c 3 \u0437\u043e\u043d\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e addCardToScroll. \u0412\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b\u0438 \u0432 \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e\u0442\u0432\u0435\u0447\u0443 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<pre><code class=\"kotlin\">private fun addCardToScroll(_input: String) { \u00a0\u00a0\u00a0 val blockView = View.inflate(this, R.layout.block, null)\/\/\u0421\u043e\u0437\u0434\u0430\u0451\u043c 1 block \u00a0\u00a0\u00a0 val blockText = blockView.findViewById&lt;TextView>(R.id.text)\/\/\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0435 Text \u00a0\u00a0\u00a0 val blockImage = blockView.findViewById&lt;ImageView>(R.id.image)\/\/\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0435 Image \u00a0\u00a0\u00a0 var isCheck = false \u00a0\u00a0\u00a0 blockText.text = _input \u00a0\u00a0\u00a0 blockImage.setImageResource(R.color.white)  \u00a0\u00a0\u00a0 scrollLinearLayout.addView(blockView)\/\/\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c block \u0432 scrollView  \u00a0\u00a0\u00a0 val params = \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 blockView.layoutParams as? ViewGroup.MarginLayoutParams \u00a0\u00a0\u00a0 params?.setMargins(20, 12, 20, 12)\/\/\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Margin \u00a0\u00a0\u00a0 blockView.layoutParams = params\/\/\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u00a0\u00a0\u00a0 blockView.elevation = 20f\/\/\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u043e\u0447\u043a\u0443 \u0432\u0432\u0435\u0440\u0445 \u0434\u043b\u044f \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043d\u0438 \u0432\u043e\u043a\u0440\u0443\u0433 \u00a0\u00a0\u00a0 blockText.setAutoSizeTextTypeUniformWithConfiguration( \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1, 22, 1, TypedValue.COMPLEX_UNIT_DIP)\/\/\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 AutoSize \u00a0\u00a0\u00a0 \/\/\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u00a0\u00a0\u00a0 blockView.setOnClickListener { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 isCheck = !isCheck \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (isCheck) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 blockImage.setImageResource(R.drawable.checkyes)\/\/\u0417\u0430\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u043a\u043e\u043d\u043a\u0443 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 blockImage.setImageResource(R.drawable.checkno)  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 animateView(blockImage)\/\/\u0410\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u043c \u0438\u043a\u043e\u043d\u043a\u0443 \u00a0\u00a0\u00a0 } } \/\/\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0438\u043a\u043e\u043d\u043e\u043a private fun animateView(view: ImageView) { \u00a0\u00a0\u00a0 when (val drawable = view.drawable) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 is AnimatedVectorDrawable -> { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 drawable.start() \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 } }<\/code><\/pre>\n<p>\u041c\u043e\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u2013 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 xml. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u0438 \u0432 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0412\u044b \u0436\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u043b\u044e\u0431\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. \u0412\u0435\u0441\u044c \u043c\u043e\u0439 \u043a\u043e\u0434, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 GitHub.<\/p>\n<p>\u0423\u0436\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u0435 \u043f\u0440\u0430\u0432\u0434\u0430 \u043b\u0438?<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043e\u043d\u0446\u0435 \u043d\u0430\u0448\u0435\u0433\u043e onCreate() \u0442\u0430\u043a\u0438\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c 3 \u0437\u043e\u043d\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<pre><code class=\"kotlin\">for(index in 0..10){ \u00a0\u00a0\u00a0 addCardToScroll(index.toString()) }<\/code><\/pre>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1c4\/bc4\/bb8\/1c4bc4bb8e8f33c882c4f1b9dff1d86d.gif\" width=\"406\" height=\"866\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1c4\/bc4\/bb8\/1c4bc4bb8e8f33c882c4f1b9dff1d86d.gif\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041e\u0436\u0438\u0432\u043b\u044f\u0435\u043c &#171;\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f&#187;<\/h2>\n<p>\u0427\u0442\u043e \u0436\u0435, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u2013 \u0442\u043e\u0436\u0435. \u0425\u043e\u0440\u043e\u0448\u043e. \u0410 \u0432\u043e\u0442 \u043d\u0430\u0448\u0430 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d \u0441\u0442\u043e\u0438\u0442 \u043d\u0430 \u0441\u0432\u043e\u0451\u043c \u0438 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u0441\u044f \u2013 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043c\u044b \u0432\u0435\u0434\u044c \u0438 \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f. \u041d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430, \u044f \u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0446\u0432\u0435\u0442\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u0431\u0430\u0440\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0439\u0442\u0438 \u0432 value->colors \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0446\u0432\u0435\u0442\u0430. \u041c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0439 \u201c\u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u0439\u201d \u043d\u0430\u0431\u043e\u0440.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;resources> \u00a0\u00a0\u00a0 &lt;color name=\"purple_200\">#000000&lt;\/color> \u00a0\u00a0\u00a0 &lt;color name=\"purple_500\">#4E4E4E&lt;\/color> \u00a0\u00a0\u00a0 &lt;color name=\"purple_700\">#505050&lt;\/color> \u00a0\u00a0\u00a0 &lt;color name=\"teal_200\">#717171&lt;\/color> \u00a0\u00a0\u00a0 &lt;color name=\"teal_700\">#515151&lt;\/color> \u00a0\u00a0\u00a0 &lt;color name=\"black\">#FF000000&lt;\/color> \u00a0\u00a0\u00a0 &lt;color name=\"white\">#FFFFFFFF&lt;\/color> &lt;\/resources><\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u201c\u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201c.<\/p>\n<p>\u041d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c -> \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u043e\u0433\u0434\u0430 \u0431\u044b\u043b \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0451\u043d \u0441\u043a\u0440\u043e\u043b\u043b. \u041f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u043d\u0430 ScrollView. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u0438\u043c \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u043c.<\/p>\n<pre><code class=\"kotlin\">scrollView.viewTreeObserver.addOnScrollChangedListener(ViewTreeObserver.OnScrollChangedListener { \/\/\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043a\u0440\u043e\u043b\u043b \u00a0\u00a0\u00a0 scrollEngine() })<\/code><\/pre>\n<p>scrollEngine() \u2013 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0432\u0438\u0433\u0430\u044e\u0449\u0430\u044f \u043d\u0430\u0448\u0443 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u201d, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0435\u0451.<\/p>\n<pre><code class=\"kotlin\">private fun scrollEngine() { \u00a0\u00a0\u00a0 val upDown: Boolean = scrollView.scrollY &lt; scrollY\/\/ true if scroll up \u00a0\u00a0\u00a0 val params = \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 panel.layoutParams as ViewGroup.MarginLayoutParams\/\/\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b LinearLayout MiniMain  \u00a0\u00a0\u00a0 val temp: Int = if (upDown) {\/\/\u0421\u0447\u0438\u0442\u0430\u0435\u043c \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u043d\u0430\u0448\u0443 panel \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (scrollView.scrollY &lt;= maxScroll) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 params.topMargin + (scrollY - scrollView.scrollY) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } else \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 \u00a0\u00a0\u00a0 } else \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 params.topMargin - scrollView.scrollY + scrollY \u00a0\u00a0\u00a0 if ((temp &lt; 0) &amp;&amp; !(upDown)) {\/\/\u0414\u0432\u0438\u0433\u0430\u0435\u043c panel \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 params.topMargin = 0 \u00a0\u00a0\u00a0 } else if ((temp > maxScroll) &amp;&amp; (upDown)) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 params.topMargin = maxScroll \u00a0\u00a0\u00a0 } else { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 params.topMargin = temp \u00a0\u00a0\u00a0 }  \u00a0\u00a0\u00a0 panel.layoutParams = params\/\/\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u00a0\u00a0\u00a0 scrollY = scrollView.scrollY }<\/code><\/pre>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u0438\u0434\u0435\u0442\u044c 5 \u043c\u0438\u043d\u0443\u0442 \u0438 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u043e \u0432\u0441\u0451 \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u0430\u043d\u0435\u0442 \u044f\u0441\u043d\u043e. \u0418\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/016\/fc6\/677\/016fc667715f6d5d843a2e5c18d9727e.gif\" width=\"406\" height=\"866\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/016\/fc6\/677\/016fc667715f6d5d843a2e5c18d9727e.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043f\u0430\u0440\u0443 \u0431\u0430\u0433\u043e\u0432*. \u041f\u043e\u043b\u0437\u0443\u043d\u043e\u043a, \u00a0\u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0433\u0434\u0435 \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u0432 ScrollView, \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0430\u0448\u0435\u0439 \u201c\u043f\u0430\u043d\u0435\u043b\u044c\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u201d. \u0418 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u0441\u043e\u0432\u0441\u0435\u043c. \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432 xml \u0444\u0430\u0439\u043b\u0435 \u0442\u0430\u043a\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0432 ScrollView.<\/p>\n<pre><code class=\"xml\">android:scrollbars=\"none\"<\/code><\/pre>\n<p>2-\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0437\u043e\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u042d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u043d\u044c\u044e.<\/p>\n<pre><code class=\"kotlin\">private fun alphaElevation() { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 val params = \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 panel.layoutParams as ViewGroup.MarginLayoutParams \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 panelText.alpha = \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (1 - (scrollY.toFloat() * 100.0 \/ maxScroll.toFloat() \/ 100.0) \/ 0.5).toFloat()\/\/\u041f\u043b\u0430\u0432\u043d\u043e\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u043e\u0432\u0435\u043d\u0438\u0435\/\u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 panelText \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 theBigText.alpha = (scrollY.toFloat() * 100.0 \/ maxScroll.toFloat() \/ 100.0).toFloat()\/\/\u041f\u043b\u0430\u0432\u043d\u043e\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u043e\u0432\u0435\u043d\u0438\u0435\/\u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \/\/\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0438\u043a\u043e\u043d\u043a\u0430 \u0442\u043e\u0436\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u043f\u043b\u0430\u0432\u043d\u043e, \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 var settingsAlpha = \/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ((scrollY.toFloat() * 100.0 \/ maxScroll.toFloat() \/ 100.0)).toFloat() \/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (settingsAlpha &lt; 0.7f) \/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CompasIcon.alpha = settingsAlpha \/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else \/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CompasIcon.alpha = 0.7f \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u0415\u0441\u043b\u0438 panel \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430 -> \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043d\u044c \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (params.topMargin == 0) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 panel.elevation = 10f \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 panel.elevation = 0.1f \u00a0\u00a0\u00a0 }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c ScrollView \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a.<\/p>\n<pre><code class=\"kotlin\">scrollView.viewTreeObserver.addOnScrollChangedListener(ViewTreeObserver.OnScrollChangedListener { \/\/\u0412\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043a\u0440\u043e\u043b\u043b \u00a0\u00a0\u00a0 scrollEngine() \u00a0\u00a0\u00a0 alphaElevation() })<\/code><\/pre>\n<p>\u0418 \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d6d\/4d5\/cb9\/d6d4d5cb9c8fb400c67662fa80dff1d1.gif\" width=\"406\" height=\"866\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d6d\/4d5\/cb9\/d6d4d5cb9c8fb400c67662fa80dff1d1.gif\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041c\u0430\u0433\u0438\u044f \u043c\u0430\u0433\u043d\u0438\u0442\u043e\u0432<\/h2>\n<p>\u041f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0435, \u043d\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u043d\u043e. \u201c\u041f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u201d \u0438\u043c\u0435\u0435\u0442 2 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<ol>\n<li>\n<p>\u041a\u043e\u0433\u0434\u0430 panel \u043f\u0440\u0438\u043c\u0430\u0433\u043d\u0438\u0447\u0435\u043d\u043e \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u0432\u043e\u0442, \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c OneUI ScrollView \u0441\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u201d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u044d\u0442\u0438\u043c\u0438 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0418 \u0441\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u043e\u043d\u043e \u0432 \u0442\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u043b\u0438\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u0417\u0432\u0443\u0447\u0438\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043d\u043e \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 gif \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c, \u0433\u0434\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u201d, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u043d\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u044d\u043a\u0440\u0430\u043d\u043e\u043c. \u041f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f &#8212; \u043f\u043e\u0434\u043d\u044f\u043b \u043f\u0430\u043b\u0435\u0446. \u0418 \u0434\u043b\u044f \u043f\u043b\u0430\u0432\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0438 \u0431\u043e\u043b\u0435\u0435 \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0432 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u043a\u0443\u043d\u0434, \u0432\u0435\u0434\u044c ScrollView \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0435\u0449\u0451 \u0432 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0438.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u0441\u0430\u043c\u044b\u0445 \u043d\u0438\u0437\u043e\u0432. <\/p>\n<p>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0438\u043a\u0430\u0441\u0430\u043b\u0441\u044f \u043a \u044d\u043a\u0440\u0430\u043d\u0443, \u0430 \u043a\u043e\u0433\u0434\u0430 \u043d\u0435\u0442. \u0412 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c.<\/p>\n<pre><code class=\"kotlin\">\/\/\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d @SuppressLint(\"ClickableViewAccessibility\") fun touchFun() { \u00a0\u00a0\u00a0 scrollView.setOnTouchListener { v, event -> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 val action = event.action \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 when (action) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 MotionEvent.ACTION_DOWN -> { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 false \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 MotionEvent.ACTION_UP -> { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 threadTimer() \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 false \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 MotionEvent.ACTION_CANCEL -> { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 false \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0MotionEvent.ACTION_OUTSIDE -> { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 false \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else -> false \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 } }<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u0435\u0441\u0442\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u0440\u0438\u043c\u0430\u0433\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0438 \u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043d\u0430\u0448 ScrollView.<\/p>\n<pre><code class=\"kotlin\">\/\/\u0422\u0430\u0439\u043c\u0435\u0440+\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 panel \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 private fun threadTimer() { \u00a0\u00a0\u00a0 var lastScrollY = 0 \u00a0\u00a0\u00a0 \/\/\u041c\u044b \u043d\u0435 \u0438\u043c\u0435\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043c\u043e\u0440\u043e\u0437\u043a\u0438 \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c UI \u043f\u043e\u0442\u043e\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u00a0\u00a0\u00a0 Thread { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u041f\u043e\u043a\u0430 \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 ScrollView \u043d\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0441\u044f \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 while (scrollView.scaleY.toInt() != lastScrollY) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 lastScrollY = scrollView.scrollY \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u041f\u043e\u043b \u0441\u0435\u043a\u0443\u043d\u0434\u044b \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Thread.sleep(500) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u0415\u0441\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0440\u0430\u0432\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (scrollView.scaleY.toInt() != lastScrollY) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 lastScrollY = scrollView.scaleY.toInt() \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 ScrollView \u043c\u0435\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 panel \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (scrollY &lt; maxScroll) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u0415\u043b\u0441\u0438 ScrollView \u0431\u043b\u0438\u0436\u0435 \u043a \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e panel \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (scrollY >= maxScroll \/ 3)\/\/\u041f\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u043a\u0440\u043e\u043b\u043b \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c UI \u043d\u0435 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c post \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 scrollView.post { scrollView.smoothScrollTo(0, maxScroll) } \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/\u0415\u0441\u043b\u0438 ScrollView \u0431\u043b\u0438\u0436\u0435 \u043a \u0432\u0435\u0440\u0445\u043d\u0435\u043c\u0443 \u043a\u0440\u0430\u044e \u044d\u043a\u0440\u0430\u043d\u0430 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else if (scrollY &lt; maxScroll \/ 3) \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c UI \u043d\u0435 \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c post \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 scrollView.post { scrollView.smoothScrollTo(0, 0) } \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } \u00a0\u00a0\u00a0 }.start() }<\/code><\/pre>\n<p>\u00a0<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a49\/ba9\/334\/a49ba93348e0b29dd26fe564009a34c6.gif\" width=\"406\" height=\"866\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a49\/ba9\/334\/a49ba93348e0b29dd26fe564009a34c6.gif\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0412\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0435, \u043d\u0443 \u043d\u0430 \u043c\u043e\u0439 \u0441\u0443\u0433\u0443\u0431\u043e \u043b\u0438\u0447\u043d\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0438 \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u0443 \u0441\u0430\u043c\u0443\u044e \u0438\u0434\u0435\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435\u0441\u0451\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0430 OneUI. \u0422\u0430\u043a \u0436\u0435 \u043b\u0438 \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0443 Samsung? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u043d\u0435\u0442. \u041d\u043e \u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043e\u043f\u0438\u0441\u0430\u043b, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0441\u0451 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0437\u0434\u0435\u0441\u044c. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0435\u0440\u0442\u044b, \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 <em>Siesta 1.0<\/em>. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u0442.\u043a. \u0432 \u0441\u0432\u043e\u0451 \u0432\u0440\u0435\u043c\u044f, \u0435\u0451 \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0438 \u0432\u043e \u0432\u0441\u0451\u043c \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441 0. \u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0435, \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0441\u0432\u043e\u0438\u043c \u043c\u043d\u0435\u043d\u0438\u0435\u043c, \u043a\u0430\u043a \u0432\u0430\u043c \u043c\u043e\u0451 \u0434\u0435\u0442\u0438\u0449\u0435 \u0438 One UI.<\/p>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 GitHub. \u0411\u043e\u043d\u0443\u0441\u043e\u043c \u0438\u0434\u0451\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 Siesta 1.0, \u043e\u043d\u043e \u0441\u043f\u0440\u044f\u0442\u0430\u043d\u043e \u0432 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0435.<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/MixKage\/Siesta\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 GitHub<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.nonamecompany.valudas\" rel=\"noopener noreferrer nofollow\">\u0422\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0435\u0435 Siesta 1.0<\/a><\/p>\n<\/li>\n<\/ul>\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\/574904\/\"> https:\/\/habr.com\/ru\/articles\/574904\/<\/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>One UI \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0436\u0435 \u043a\u0430\u043a 3 \u0433\u043e\u0434\u0430 (\u0441 2018), \u0430 \u0443\u0440\u043e\u043a\u043e\u0432 \u043f\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0434\u0438\u0437\u0430\u0439\u043d, \u0432 \u043c\u0438\u0440\u0435 android, \u044f \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b. \u041d\u0435 \u043f\u043e\u0440\u044f\u0434\u043e\u043a\u2026 \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0436\u0435, \u043c\u044b \u043d\u0430\u0447\u043d\u0451\u043c \u043f\u0440\u043e\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u044f\u0436\u0451\u043b\u044b\u0439 \u0438 \u0442\u0435\u0440\u043d\u0438\u0441\u0442\u044b\u0439 \u043f\u0443\u0442\u044c.<\/p>\n<h2>\u0417\u0430\u0440\u043e\u0436\u0434\u0435\u043d\u0438\u0435 Siesta<\/h2>\n<p>\u042f \u0434\u0443\u043c\u0430\u044e, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e One UI. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u044f \u0431\u0443\u0434\u0443 \u0438\u043c\u0435\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u043b\u0438\u0431\u043e \u0438 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 (\u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e One UI &#8212; Siesta) \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0441\u0435\u0445 \u043d\u0430\u0448\u0438\u0445 \u0441\u0442\u0440\u0430\u0434\u0430\u043d\u0438\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435. \u0414\u0430, \u044d\u0442\u043e \u043d\u0435 \u043a\u043e\u043f\u0438\u044f Samsung \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 (\u043f\u0440\u044f\u043c \u0441\u043e\u0432\u0441\u0435\u043c), \u043d\u043e \u043d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c \u2013 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0448\u044c \u0438\u0434\u0435\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0440\u0443\u043a\u043e\u0439, \u0430 \u043d\u0435 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0440\u0438\u0444\u0442\u044b \u0438 \u0438\u043a\u043e\u043d\u043a\u0438\u2026<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<h2>\u0418\u0434\u0435\u044f One UI<\/h2>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0432 OneUI.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0437\u043e\u043d\u044b, \u0433\u0434\u0435 1\/3 \u044d\u043a\u0440\u0430\u043d\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043d\u0430 \u043a\u0430\u043a\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u043c\u044b \u043d\u0430\u0445\u043e\u0434\u0438\u043c\u0441\u044f. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0435\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0442\u044f\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u0432\u0435\u0440\u0445\u043d\u0438\u0435 \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430. \u0417\u0430\u0442\u0435\u043c \u0438\u0434\u0451\u0442 2-\u0430\u044f \u0437\u043e\u043d\u0430, \u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0435\u0451 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d, \u044d\u0442\u0430 \u0437\u043e\u043d\u0430 \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0435\u0442 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043a\u0440\u0430\u044f \u044d\u043a\u0440\u0430\u043d\u0430, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0430\u0433\u043d\u0438\u0447\u0435\u043d\u0430, \u0434\u0430\u0431\u044b \u043d\u0435 \u0443\u043b\u0435\u0442\u0435\u0442\u044c \u0437\u0430 \u0435\u0433\u043e \u043a\u0440\u0430\u044f. \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0437\u043e\u043d\u0443 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/p>\n<p>\u042d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c <u>\u0433\u043b\u0430\u0432\u043d\u0430\u044f<\/u> \u0438\u0434\u0435\u044f OneUI \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0443\u043a\u0430\u0436\u0435\u043c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f Android 8.0, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432 TextView \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c AutoSize \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 Android \u2013 \u043d\u0435 \u0431\u0435\u0434\u0430. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445.<\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435 Android<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"full-width\"><figcaption>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u0437\u044f\u0442\u0430 \u0438\u0437 Android Studio<\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption>https:\/\/www.appbrain.com\/stats\/top-android-sdk-versions<\/figcaption><\/figure>\n<\/div>\n<\/details>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>Frontend &#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u043e\u043d<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043f\u0443\u0441\u0442\u043e\u0435 Activity. \u0420\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f RelativeLayout, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d \u043d\u0430 ScrollView. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0430\u043c ScrollView. \u0412 ScrollView \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u044d\u0442\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f LinearLayout, \u0442.\u043a. \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044f \u0432\u0441\u0442\u0430\u0432\u0438\u043b \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0438 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043e \u0447\u0451\u043c \u0438\u0434\u0451\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;RelativeLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"     xmlns:tools=\"http:\/\/schemas.android.com\/tools\"     android:layout_width=\"match_parent\"     android:layout_height=\"match_parent\"     tools:context=\".MainActivity\">  &lt;!--\u043c\u0435\u0441\u0442\u043e 2 \u0437\u043e\u043d\u044b-->     &lt;RelativeLayout         android:layout_width=\"match_parent\"         android:layout_height=\"50dp\">      &lt;\/RelativeLayout>  &lt;!--\u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f 1 \u0438 3 \u0437\u043e\u043d\u0430-->     &lt;ScrollView         android:id=\"@+id\/scrollView\"         android:layout_width=\"match_parent\"         android:layout_height=\"match_parent\">          &lt;LinearLayout             android:id=\"@+id\/scrollLinearLayout\"             android:layout_width=\"match_parent\"             android:layout_height=\"match_parent\"             android:orientation=\"vertical\">          &lt;\/LinearLayout>     &lt;\/ScrollView> &lt;\/RelativeLayout><\/code><\/pre>\n<h2>1 \u0437\u043e\u043d\u0430 &#8212; theBigText<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0442\u0435\u043a\u0441\u0442. \u0414\u0430\u0434\u0438\u043c \u0435\u043c\u0443 id, \u0441\u0442\u0440\u043e\u0433\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0432 250dp, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 autoSizeTextType=\u201duniform\u201d \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430, gravity=\u201dcenter\u201d \u0434\u043b\u044f \u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0430\u0440\u0443 padding\u2019\u043e\u0432 \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043e\u0442\u044b \u0438 \u0436\u0438\u0440\u043d\u044b\u0439 \u0448\u0440\u0438\u0444\u0442.<\/p>\n<pre><code class=\"xml\">&lt;TextView \u00a0\u00a0\u00a0 android:id=\"@+id\/theBigText\" \u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0 android:layout_height=\"250dp\" \u00a0\u00a0\u00a0 android:autoSizeTextType=\"uniform\" \u00a0\u00a0\u00a0 android:gravity=\"center\" \u00a0\u00a0\u00a0 android:paddingHorizontal=\"50dp\" \u00a0\u00a0\u00a0 android:paddingTop=\"100dp\" \u00a0\u00a0\u00a0 android:paddingBottom=\"30dp\" \u00a0\u00a0\u00a0 android:text=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\" \u00a0\u00a0\u00a0 android:textStyle=\"bold\"\/><\/code><\/pre>\n<h2>2 \u0437\u043e\u043d\u0430 &#8212; &#171;\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f&#187;<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u043d\u0430\u0448\u0443 \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c id, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u0433\u0443\u044e \u0432\u044b\u0441\u043e\u0442\u0443 \u0432 50dp, orientation=\u201dhorizontal\u201d \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 layout_marginTop=\u201d250dp\u201d (\u0432 \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0440\u043e\u0432\u043d\u043e \u043f\u043e\u0434 \u043d\u0438\u043c). \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a theBigText, \u0442.\u043a. \u043e\u043d \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c ScrollView, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430\u0448\u0443 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d. \u0412\u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u043d\u0435\u0451 TextView \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0434\u043b\u044f \u043d\u0435\u0451 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b: gravity=\u201dcenter_vertical\u201d, textSize=\u201d30sp\u201d \u0438 alpha=\u201d0\u201d (\u0432\u0435\u0434\u044c \u0442\u0435\u043a\u0441\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0438\u0434\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e, \u043a\u043e\u0433\u0434\u0430 \u043f\u0430\u043d\u0435\u043b\u044c \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0435\u043d\u0430 \u0432\u0432\u0435\u0440\u0445)<\/p>\n<p>ImageView: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0441\u0442\u0440\u043e\u0433\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432 40dp, gravity=\u201dcenter_vertical\u201d, alpha=\u201d0.7\u201d, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a\u043e\u043c\u043f\u0430\u0441\u0430 \u0438 \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043c \u043a \u043f\u0440\u0430\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044d\u043a\u0440\u0430\u043d\u0430. <\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u0432\u0441\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u043d\u0438\u0436\u0435.<\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout     android:id=\"@+id\/panel\"     android:layout_width=\"match_parent\"     android:layout_height=\"50dp\"     android:layout_marginTop=\"250dp\"     android:background=\"@color\/white\"     android:orientation=\"horizontal\">      &lt;TextView         android:id=\"@+id\/panelText\"         android:layout_width=\"wrap_content\"         android:layout_height=\"match_parent\"         android:gravity=\"center_vertical\"         android:paddingStart=\"20dp\"         android:text=\"\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\"         android:textSize=\"30sp\"         android:alpha=\"0\" \/>      &lt;ImageView         android:id=\"@+id\/compassIcon\"         android:layout_width=\"40dp\"         android:layout_height=\"match_parent\"         android:layout_alignParentEnd=\"true\"         android:layout_marginEnd=\"20dp\"         android:gravity=\"center_vertical\"         android:src=\"@drawable\/compas\"         android:alpha=\"0.7\" \/> &lt;\/RelativeLayout><\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u041d\u0430\u0448\u0430 \u201c\u043f\u0430\u043d\u0435\u043b\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432\u201d \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u0441\u0442\u043e, \u0430 \u0435\u0441\u043b\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043b\u044e\u0431\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 ScrollView, \u0442\u043e \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0443\u0441\u0442\u043e\u0439 View, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u044a\u0435\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u043d\u0430\u043c \u043f\u043e\u0434 2-\u0443\u044e \u0437\u043e\u043d\u0443 \u043c\u0435\u0441\u0442\u043e.<\/p>\n<pre><code class=\"xml\">&lt;View \u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0 android:layout_height=\"80dp\" \/><\/code><\/pre>\n<h2>3 \u0437\u043e\u043d\u0430 &#8212; \u043a\u043e\u043d\u0442\u0435\u043d\u0442<\/h2>\n<p>\u0424\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e Activity \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043d. \u0422\u0435\u043f\u0435\u0440\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e 3-\u0439 \u0437\u043e\u043d\u044b. \u0417\u043e\u043d\u044b \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430. \u041d\u0430 1-\u043c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0437\u043e\u043d\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u201c\u0441\u043a\u0440\u0443\u0433\u043b\u0451\u043d\u043d\u044b\u0445 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432\u201d, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u043c.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 LayoutResource \u043f\u043e\u0434 \u0438\u043c\u0435\u043d\u0435\u043c \u201cblock\u201d. \u041e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0431\u044d\u043a\u0435\u043d\u0434, \u043b\u0438\u0448\u044c xml \u0444\u0430\u0439\u043b.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>CardView \u043f\u043e\u0434\u043e\u0439\u0434\u0451\u0442 \u043f\u043e\u0434 \u043d\u0430\u0448 \u0431\u043b\u043e\u043a \u043a\u0430\u043a \u043d\u0438\u043a\u0442\u043e \u043b\u0443\u0447\u0448\u0435! \u0414\u0430\u0434\u0438\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b CardView \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0433\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0445\u043e\u0436\u0438 \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u0438\u0445 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<pre><code class=\"xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?> &lt;androidx.cardview.widget.CardView android:id=\"@+id\/cardView\" \u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0 android:layout_height=\"80dp\" \u00a0\u00a0\u00a0 android:layout_margin=\"8dp\" \u00a0\u00a0\u00a0 app:cardCornerRadius=\"20dp\" \u00a0\u00a0\u00a0 app:cardElevation=\"20dp\" \u00a0\u00a0\u00a0 xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\" \u00a0\u00a0\u00a0 xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\">  \u00a0\u00a0\u00a0 &lt;LinearLayout \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_height=\"match_parent\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:orientation=\"horizontal\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:weightSum=\"3\">  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;ImageView \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:id=\"@+id\/image\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_width=\"60dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_height=\"60dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_gravity=\"center\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_marginVertical=\"20dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_marginStart=\"10dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:alpha=\"0.7\" \/>  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;TextView \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:id=\"@+id\/text\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_width=\"match_parent\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_height=\"match_parent\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:layout_margin=\"10dp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:textSize=\"22sp\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:textStyle=\"bold\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:alpha=\"0.7\" \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 android:gravity=\"left|center_vertical\" \/> \u00a0\u00a0\u00a0 &lt;\/LinearLayout> &lt;\/androidx.cardview.widget.CardView><\/code><\/pre>\n<p>\u0421 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u043e\u043c \u043f\u043e\u043a\u043e\u043d\u0447\u0435\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u0430\u043c\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u043c\u0443!<\/p>\n<h2>Backend<\/h2>\n<p>\u041f\u0435\u0440\u0435\u0434 setContentView \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0412\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u0432 \u043a\u043e\u0434.<\/p>\n<pre><code class=\"kotlin\">class MainActivity : AppCompatActivity() { \u00a0\u00a0\u00a0 override fun onCreate(savedInstanceState: Bundle?) { \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 super.onCreate(savedInstanceState) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 supportActionBar?.hide()\/\/\u0423\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0431\u0430\u0440 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)\/\/\u0421\u0442\u0430\u0432\u0438\u0442 \u0441\u0432\u0435\u0442\u043b\u0443\u044e \u0442\u0435\u043c\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 window.navigationBarColor = resources.getColor(R.color.black)\/\/\u0421\u0442\u0430\u0432\u0438\u0442 \u0447\u0451\u0440\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 setContentView(R.layout.activity_main) \u00a0\u00a0\u00a0 } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0430\u0440\u0443 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/p>\n<pre><code class=\"kotlin\">private lateinit var scrollView: ScrollView private lateinit var panel: RelativeLayout private lateinit var panelText: TextView private lateinit var theBigText: TextView private lateinit var compassIcon: ImageView private lateinit var scrollLinearLayout: LinearLayout<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 setContentView \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/p>\n<pre><code class=\"kotlin\">scrollView = findViewById(R.id.scrollView) panel = findViewById(R.id.panel) panelText = findViewById(R.id.theBigText) theBigText = findViewById(R.id.panelText) compassIcon = findViewById(R.id.compassIcon) scrollLinearLayout = findViewById(R.id.scrollLinearLayout)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c MarginTop \u043d\u0430\u0448\u0435\u0439 \u201c\u043f\u0430\u043d\u0435\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u201d \u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u044f\u0445, \u0442.\u043a. \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0445. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 maxScroll.<\/p>\n<pre><code class=\"kotlin\">private var maxScroll = 0 private var scrollY = 0<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0430\u043c \u043e\u0442\u0441\u0442\u0443\u043f<\/p>\n<pre><code class=\"kotlin\">val params = \u00a0\u00a0\u00a0 panel.layoutParams as ViewGroup.MarginLayoutParams\/\/\u0412\u044b\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0441\u043a\u0440\u043e\u043b\u043b \u0434\u043b\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 maxScroll = params.topMargin<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c 3 \u0437\u043e\u043d\u0443 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u043e\u043c.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e addCardToScroll. \u0412\u0441\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b\u0438 \u0432 \u043a\u043e\u0434, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e\u0442\u0432\u0435\u0447\u0443 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445.<\/p>\n<pre><code class=\"kotlin\">private fun addCardToScroll(_input: String) { \u00a0\u00a0\u00a0 val blockView = View.inflate(this, R.layout.block, null)\/\/\u0421\u043e\u0437\u0434\u0430\u0451\u043c 1 block \u00a0\u00a0\u00a0 val blockText = blockView.findViewById&lt;TextView>(R.id.text)\/\/\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0435 Text \u00a0\u00a0\u00a0 val blockImage = blockView.findViewById&lt;ImageView>(R.id.image)\/\/\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u043b\u0435 Image \u00a0\u00a0\u00a0 var isCheck = false \u00a0\u00a0\u00a0 blockText.text = _input \u00a0\u00a0\u00a0 blockImage.setImageResource(R.color.white)  \u00a0\u00a0\u00a0 scrollLinearLayout.addView(blockView)\/\/\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c block \u0432 scrollView  <\/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-406113","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/406113","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=406113"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/406113\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=406113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=406113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=406113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}