{"id":298432,"date":"2020-02-09T21:00:14","date_gmt":"2020-02-09T21:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298432"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-02-09T21:00:14","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298432","title":{"rendered":"\u041d\u0430 SDK \u043d\u0430\u0434\u0435\u0439\u0441\u044f \u0438 \u0441\u0430\u043c \u043d\u0435 \u043f\u043b\u043e\u0448\u0430\u0439: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u043a\u0440\u043e\u043b\u043b\u043e\u0432 \u0432 BottomSheetBehavior"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487650\/\">\n<p>\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043a\u0430\u0436\u0434\u044b\u0439, \u043b\u044e\u0431\u0443\u044f\u0441\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 \u0438 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043b\u0430\u0432\u043d\u043e \u0441\u044a\u0435\u0437\u0436\u0430\u044e\u0449\u0438\u043c\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043e\u043a\u043e\u0448\u043a\u0430\u043c\u0438, \u0442\u0443\u043b\u0431\u0430\u0440\u0430\u043c\u0438 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u044c\u044e\u0445\u0430\u043c\u0438, \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0434\u0430\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e \u0447\u0438\u0442\u0430\u043b \u043f\u0440\u043e CoordianatorLayout, \u043f\u0440\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 Behaivor, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u043b\u0448\u0435\u0431\u0441\u0442\u0432\u043e \u043d\u0430 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u043e\u0432\u0441\u043a\u0438\u0445 \u0432\u044c\u044e\u0445\u0430\u0445. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0432\u044c\u044e\u0445\u0438, \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0432\u043e\u0438\u043c \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u0442\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0432 Android \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u041d\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u2014 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435 \u0431\u0443\u0434\u0435\u0448\u044c \u0436\u0435 \u0442\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u0432\u044c\u044e\u0445\u0443 \u043d\u0430 \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0435, \u0432 \u0433\u043e\u0440\u044f\u0449\u0435\u043c \u043f\u043e \u0441\u0440\u043e\u043a\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u0432\u044c\u044e\u0445\u0430\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0441\u0432\u043e\u0435\u043d\u044b \u043d\u0435 \u0437\u0430 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0441\u0440\u043e\u043a \u0447\u043b\u0435\u043d\u0430\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438 \u0441\u0430\u043c\u043e\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 \u043d\u0435 \u0432\u044b\u043f\u0435\u043d\u0434\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b Android, \u0442\u0430\u043c \u0436\u0435 \u0441\u043c\u044b\u0448\u043b\u0451\u043d\u043d\u044b\u0435 \u0440\u0435\u0431\u044f\u0442\u0430 \u0441\u0438\u0434\u044f\u0442, \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0432 \u0448\u043e\u043a\u043e\u043b\u0430\u0434\u0435 (\u043d\u0443 \u0438\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u0430\u0434\u043e\u0441\u0442\u044f\u0445 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430). <\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e, \u0442\u0443\u0442 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0451 \u0431\u043b\u0438\u0437\u043a\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043c\u0430\u0433\u0438\u0435\u0439 \u0442\u0430\u043a\u0438\u0445 \u0440\u0435\u0431\u044f\u0442, \u043a\u0430\u043a CoordinatorLayout, BottomSheetBehavior, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0441 \u0431\u0430\u0433\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0438\u0437 \u0432\u0438\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u043f\u0438\u0441\u0430\u043b\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0433\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 view-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c BottomSheetBehavior, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/5bd\/b87\/59d\/5bdb8759d0bd422f85fb55e23c33f853.gif\" alt=\"\u0410\u043d\u0438\u043c\u0430\u0446\u0438\u044f CoordinatorLayout\"><\/p>\n<p>  <\/p>\n<h1 id=\"pervaya-vstrecha\">\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430<\/h1>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0441\u0442\u043e\u044f\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u043e\u0439, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u0438\u0437 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e RecyclerView, ScrollView \u0438 CoordinatorLayout, \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044f\u0441\u044c \u043d\u0430 Behavior-\u044b \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432\u044c\u044e\u0445, \u0432\u044b\u0442\u0432\u043e\u0440\u044f\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u043f\u0438\u043b\u043e\u0442\u0430\u0436\u0430, \u043a\u0430\u043a \u043f\u043b\u0430\u0432\u043d\u044b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0441\u0434\u0432\u0438\u0433\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u044c\u044e. <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/721\/1f1\/1ce\/7211f11ce678cb33205c2aabec7d7e1b.gif\" alt=\"Purpose animation\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u043b\u043e\u0436\u0438\u043c \u043f\u043e \u043f\u043e\u043b\u043e\u0447\u043a\u0430\u043c: \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 CoordinatorLayout, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f RecyclerView, \u0441 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 android.material <em>BottomSheetBehavior<\/em>, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u0448\u0435\u043c\u0443 \u0440\u0435\u0441\u0430\u0439\u043a\u043b\u0435\u0440\u0443, \u0432\u044b\u0435\u0437\u0436\u0430\u0442\u044c \u0441\u043d\u0438\u0437\u0443 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u0432\u044c\u044e \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0442\u0443\u0434\u0430 \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u0412\u043d\u0443\u0442\u0440\u0438 item-\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0433\u043e, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f TextView \u2014 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a item-\u0430, \u0438 NestedScrollView, \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u043d\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c (\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u043e\u0442 \u0436\u0435 TextView). <\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/66e\/72d\/095\/66e72d095e82429aa9c0bdbb0dede285.jpg\" alt=\"NestedScrollViewMeme\"><\/p>\n<p>  <\/p>\n<p>activity_main.xml<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;androidx.coordinatorlayout.widget.CoordinatorLayout     xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:app=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;     xmlns:tools=&quot;http:\/\/schemas.android.com\/tools&quot;     android:id=&quot;@+id\/main_layout&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     tools:context=&quot;.MainActivity&quot;&gt;      &lt;androidx.recyclerview.widget.RecyclerView         android:id=&quot;@+id\/recycler_view&quot;         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;         android:nestedScrollingEnabled=&quot;false&quot;         app:behavior_hideable=&quot;false&quot;         app:behavior_peekHeight=&quot;80dp&quot;         app:layout_behavior=&quot;com.google.android.material.bottomsheet.BottomSheetBehavior&quot; \/&gt; &lt;\/androidx.coordinatorlayout.widget.CoordinatorLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>recycler_item.xml<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;LinearLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:id=&quot;@+id\/item_bottom_sheet&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;wrap_content&quot;     android:background=&quot;?attr\/colorControlHighlight&quot;     android:orientation=&quot;vertical&quot;&gt;      &lt;TextView         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;80dp&quot;         android:background=&quot;@color\/colorAccent&quot;         android:text=&quot;@string\/head_text&quot;         android:textAlignment=&quot;center&quot;         android:textColor=&quot;@android:color\/white&quot;         android:textSize=&quot;24sp&quot; \/&gt;      &lt;androidx.core.widget.NestedScrollView         android:id=&quot;@+id\/scroll_view&quot;         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;&gt;         &lt;TextView             android:id=&quot;@+id\/item_text_view&quot;             android:layout_width=&quot;match_parent&quot;             android:layout_height=&quot;wrap_content&quot;             android:textAlignment=&quot;center&quot;             android:textSize=&quot;24sp&quot; \/&gt;     &lt;\/androidx.core.widget.NestedScrollView&gt; &lt;\/LinearLayout&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 NestedScrollView? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Android, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0442\u0443 \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0447\u0442\u043e ScrollView, \u043d\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0443, \u043a\u0430\u043a \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439, \u0442\u0430\u043a \u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0432\u044c\u044e\u0445\u0438, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043a\u0438\u0434\u0430\u043b\u0438 \u0432\u044c\u044e\u0445\u0438 \u043d\u0430 layout, \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0432\u043e\u0438\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u043e\u0432 RecyclerView.Adapter \u0438 RecyclerView.ViewHolder, \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0438, \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e&#8230;<\/p>\n<p>  <\/p>\n<p>RecyclerViewAdapter.kt<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView  class RecyclerViewAdapter(private val context: Context, private val itemList: List&lt;ItemModel&gt;) :     RecyclerView.Adapter&lt;RecyclerViewHolder&gt;() {      override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerViewHolder {         return RecyclerViewHolder.create(context, parent)     }      override fun getItemCount() = itemList.size      override fun onBindViewHolder(holder: RecyclerViewHolder, position: Int) {         holder.bind(itemList[position])     } }<\/code><\/pre>\n<p>  <\/p>\n<p>RecyclerViewHolder.kt<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView import androidx.core.widget.NestedScrollView import androidx.recyclerview.widget.RecyclerView  class RecyclerViewHolder(view: View) : RecyclerView.ViewHolder(view) {      fun bind(model: ItemModel) {         val textView: TextView = itemView.findViewById(R.id.item_text_view)         val scrollView = itemView.findViewById(R.id.scroll_view) as NestedScrollView         textView.text = &quot;&quot;         for (i in 1..50) {             textView.append(model.number.toString() + &quot;\\n&quot;)         }     }      companion object {         fun create(context: Context, parent: ViewGroup): RecyclerViewHolder {             return RecyclerViewHolder(                 LayoutInflater.from(context).inflate(                     R.layout.recycler_item,                     parent,                     false                 )             )         }     } }<\/code><\/pre>\n<p>  <\/p>\n<p>ItemModel.kt<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">data class ItemModel(val number: Int)<\/code><\/pre>\n<p>  <\/p>\n<p>MainActvity.kt<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.LinearLayoutManager import kotlinx.android.synthetic.main.activity_main.*  class MainActivity : AppCompatActivity() {      private val itemList = arrayListOf&lt;ItemModel&gt;().apply {         for (i in 0..100) {             this.add(ItemModel(i))         }     }      override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)         setContentView(R.layout.activity_main)         recycler_view.layoutManager =             LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)         recycler_view.adapter = RecyclerViewAdapter(this, itemList)     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043a\u0430\u043c\u0435\u0440\u0430, \u043c\u043e\u0442\u043e\u0440, \u0438\u2026 \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u0428\u0442\u043e\u0440\u043a\u0430 \u0432\u044b\u0435\u0437\u0436\u0430\u0435\u0442 \u0438 \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f, NestedScrollView \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f, \u0432 \u0447\u0451\u043c \u043f\u043e\u0434\u0432\u043e\u0445? \u041f\u0435\u0440\u0435\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0435\u043c recycler \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 item, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043a\u0440\u043e\u043b\u043b\u0438\u0442\u044c\u2026 \u041d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u2026 \u041f\u0440\u043e\u043a\u0440\u0443\u0442\u0438\u043c \u0435\u0449\u0451 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e item-\u043e\u0432 \u0434\u0430\u043b\u044c\u0448\u0435, \u0441\u043d\u043e\u0432\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438 \u0442\u0430\u043a \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f \u0441 \u0442\u043e\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e item-\u043e\u0432. \u041a\u0442\u043e \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0438\u0434\u0435\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b RecyclerView, \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442 \u0432 \u0447\u0451\u043c \u0434\u0435\u043b\u043e \u2014 \u0434\u0435\u043b\u043e \u0432 \u0433\u0440\u044f\u0437\u043d\u044b\u0445 View, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 Recycler \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0430. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0442\u043e, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0441\u043a\u0440\u043e\u043b\u043b\u0438\u0442\u0441\u044f NestedScrollView, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<h1 id=\"probuem-otlavlivat-sobytiya\">\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f<\/h1>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e, \u043f\u0440\u0438\u0448\u043b\u043e \u043c\u043d\u0435 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u2014 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c item-\u0435 \u0438 \u0432 \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0435\u043c. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f onScrollChange: <\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">scrollView.setOnScrollChangeListener { v: NestedScrollView?, scrollX: Int, scrollY: Int, oldScrollX: Int, oldScrollY: Int -&gt;     Log.i(&quot;TAG&quot;, &quot;OnScrollChange&quot;) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u043c item \u0432\u0441\u0451 \u043e\u043a, \u0430 \u0432\u043e\u0442 \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0438\u0448\u0438\u043d\u0430\u2026 \u0422\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0431\u0443\u0435\u043c, \u043a\u043e\u0435-\u0447\u0442\u043e \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0441\u0430\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">scrollView.setOnTouchListener { view, motionEvent -&gt;     Log.i(&quot;TAG&quot;, motionEvent.toString())     false }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u0440\u0442\u0438\u043d\u0430 \u0432 \u043b\u043e\u0433\u0430\u0445 \u043f\u043e\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435, \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a\u0430\u0441\u0430\u043d\u0438\u0439 \u043b\u043e\u0433\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043a\u0430\u043a \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c, \u0442\u0430\u043a \u0438 \u0432 \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0432 \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0435\u043c, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0434\u0442\u0438 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0448\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a \u043d\u0443\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043a\u0440\u043e\u043b\u043b.<\/p>\n<p>  <\/p>\n<h1 id=\"ischem-perehvatchika\">\u0418\u0449\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0447\u0438\u043a\u0430<\/h1>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c4b\/f7d\/6cb\/c4bf7d6cba67b2992c31efbb8abd6039.png\" alt=\"InterceptMeme\"><\/p>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0432\u0441\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043d\u0435 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0434\u043e\u0447\u0435\u0440\u043d\u044e\u044e \u0432\u044c\u044e\u0445\u0443, \u0430 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u0441\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435. \u0427\u0442\u043e \u043e\u0442 \u043d\u0430\u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f? \u041d\u0430\u0439\u0442\u0438 \u0442\u0443 \u0432\u044c\u044e\u0445\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u0432 NestedScrollView \u0441\u043e\u0431\u044b\u0442\u0438\u044f OnTouch. \u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0432\u044c\u044e\u0445\u0435 item-\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"kotlin\">itemView.setOnTouchListener { view, motionEvent -&gt;     Log.i(&quot;TAG&quot;, motionEvent.toString())     false }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0418\u0434\u0451\u043c \u0432\u044b\u0448\u0435, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0432 \u0441\u0430\u043c\u043e\u043c recycler, \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u043d\u0435 \u0432\u0441\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0430\u043c\u043e\u0433\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u043d\u044f: CoordinatorLayout, \u0438 \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u0438\u0442\u0438\u0435 \u2014 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0438\u0437 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e item-\u0430, \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u043a\u0430\u043a \u0438\u0437 \u043d\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 CoordinatorLayout, \u043c\u0430\u043b\u043e \u0447\u0435\u0433\u043e \u0443\u043c\u0435\u0435\u0442, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043d\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u2014 CoordinatorLayout, \u0433\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0440\u0430\u0432\u0435\u043d FrameLayout. \u0418 \u0442\u0443\u0442 \u043c\u044b \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b\u0438 RecyclerView \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 material \u2014 BottomSheetBehavior. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0431\u044b\u0442\u044c, \u043e\u043d \u0442\u043e\u0442, \u043a\u043e\u0433\u043e \u043c\u044b \u0438 \u0438\u0441\u043a\u0430\u043b\u0438.<\/p>\n<p>  <\/p>\n<h1 id=\"bottomsheetbehavior\">BottomSheetBehavior<\/h1>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 BottomSheetBehavior \u0432 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432\u0430\u0445 \u2014 java \u043a\u043b\u0430\u0441\u0441, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u043e\u0442 CoordinatorLayout.Behavior, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0432\u044c\u044e\u0445\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 (CoordinatorLayout). \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0437\u0430\u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u041d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c \u043e\u0442 BottomSheetBehavior \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 TestBehavior, \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043b\u043e\u0433\u0438 \u0438 \u0432\u044b\u0437\u043e\u0432\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0441\u0443\u043f\u0435\u0440-\u043a\u043b\u0430\u0441\u0441\u0430. \u041f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 RecyclerView \u043d\u043e\u0432\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435.   <\/p>\n<p>TestBehavior.java<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">import android.content.Context; import android.os.Parcelable; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.View;  import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.coordinatorlayout.widget.CoordinatorLayout;  import com.google.android.material.bottomsheet.BottomSheetBehavior;  public class TestBehavior&lt;V extends View&gt; extends BottomSheetBehavior&lt;V&gt; {      public TestBehavior(@NonNull Context context, @Nullable AttributeSet attrs) {         super(context, attrs);     }      @Override     public boolean onInterceptTouchEvent(@NonNull CoordinatorLayout parent, @NonNull V child, @NonNull MotionEvent event) {         Log.i(&quot;TAG&quot;, &quot;onInterceptTouchEvent&quot;);         return super.onInterceptTouchEvent(parent, child, event);     }      @Override     public void onRestoreInstanceState(             @NonNull CoordinatorLayout parent, @NonNull V child, @NonNull Parcelable state) {         Log.i(&quot;TAG&quot;, &quot;onRestoreInstanceState&quot;);         super.onRestoreInstanceState(parent, child, state);     }      @Override     public void onAttachedToLayoutParams(@NonNull CoordinatorLayout.LayoutParams layoutParams) {         Log.i(&quot;TAG&quot;, &quot;onAttachedToLayoutParams&quot;);         super.onAttachedToLayoutParams(layoutParams);     }      @Override     public void onDetachedFromLayoutParams() {         Log.i(&quot;TAG&quot;, &quot;onDetachedFromLayoutParams&quot;);         super.onDetachedFromLayoutParams();     }      @Override     public boolean onLayoutChild(             @NonNull CoordinatorLayout parent, @NonNull V child, int layoutDirection) {         Log.i(&quot;TAG&quot;, &quot;onLayoutChild&quot;);         return super.onLayoutChild(parent, child, layoutDirection);     }      @Override     public boolean onTouchEvent(             @NonNull CoordinatorLayout parent, @NonNull V child, @NonNull MotionEvent event) {         Log.i(&quot;TAG&quot;, &quot;onTouchEvent &quot; + event.toString());         return super.onTouchEvent(parent, child, event);     }      @Override     public boolean onStartNestedScroll(             @NonNull CoordinatorLayout coordinatorLayout,             @NonNull V child,             @NonNull View directTargetChild,             @NonNull View target,             int axes,             int type) {         Log.i(&quot;TAG&quot;, &quot;onStartNestedScroll&quot;);         return super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, axes, type);     }      @Override     public void onNestedPreScroll(             @NonNull CoordinatorLayout coordinatorLayout,             @NonNull V child,             @NonNull View target,             int dx,             int dy,             @NonNull int[] consumed,             int type) {         Log.i(&quot;TAG&quot;, &quot;onNestedPreScroll&quot;);         super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type);     }      @Override     public void onStopNestedScroll(             @NonNull CoordinatorLayout coordinatorLayout,             @NonNull V child,             @NonNull View target,             int type) {         Log.i(&quot;TAG&quot;, &quot;onStopNestedScroll&quot;);         super.onStopNestedScroll(coordinatorLayout, child, target, type);     }      @Override     public void onNestedScroll(             @NonNull CoordinatorLayout coordinatorLayout,             @NonNull V child,             @NonNull View target,             int dxConsumed,             int dyConsumed,             int dxUnconsumed,             int dyUnconsumed,             int type,             @NonNull int[] consumed) {         Log.i(&quot;TAG&quot;, &quot;onNestedScroll&quot;);         super.onNestedScroll(coordinatorLayout, child, target, dxConsumed, dyConsumed, dxUnconsumed, dyUnconsumed, type, consumed);     }      @Override     public boolean onNestedPreFling(             @NonNull CoordinatorLayout coordinatorLayout,             @NonNull V child,             @NonNull View target,             float velocityX,             float velocityY) {         Log.i(&quot;TAG&quot;, &quot;onNestedPreFling&quot;);         return super.onNestedPreFling(coordinatorLayout, child, target, velocityX, velocityY);     } }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"xml\">    &lt;androidx.recyclerview.widget.RecyclerView         android:id=&quot;@+id\/recycler_view&quot;         android:layout_width=&quot;match_parent&quot;         android:layout_height=&quot;match_parent&quot;         android:nestedScrollingEnabled=&quot;false&quot;         app:behavior_hideable=&quot;false&quot;         app:behavior_peekHeight=&quot;80dp&quot;         app:layout_behavior=&quot;.TestBehavior&quot; \/&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u043e\u0433\u0438. \u0412 \u0440\u0430\u0431\u043e\u0447\u0435\u043c item-\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f: onInterceptTouchEvent, onStartNestedScroll, onNestedPreScroll, onNestedScroll, onStopNestedScroll. \u0412 \u043d\u0435\u0440\u0430\u0431\u043e\u0447\u0435\u043c: onInterceptTouchEvent, onStartNestedScroll, onNestedPreScroll, onStopNestedScroll. \u0421\u0443\u0434\u044f \u043f\u043e \u0432\u0441\u0435\u043c\u0443, \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 onNestedPreScroll \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u0433\u043b\u0443\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043c\u0435\u0442\u043e\u0434\u0443 onNestedPreScroll \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 BottomSheetBehavior \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0442\u043e\u0447\u043a\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a, \u0438 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430: <\/p>\n<p>  <\/p>\n<pre><code class=\"java\">View scrollingChild = nestedScrollingChildRef != null ? nestedScrollingChildRef.get() : null; if (target != scrollingChild) {   return; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u0437\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f nestedScrollingChildRef? \u0421\u043b\u0430\u0431\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 View, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 View, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 CoordinatorLayout \u0438 View, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">  @Nullable WeakReference&lt;View&gt; nestedScrollingChildRef;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 onLayoutChild:<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">  @Override   public boolean onLayoutChild(       @NonNull CoordinatorLayout parent, @NonNull V child, int layoutDirection) {       ...       nestedScrollingChildRef = new WeakReference&lt;&gt;(findScrollingChild(child));       return true;   }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0442\u0443\u0442 \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u043f\u0440\u043e Recycler, \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0439 item, \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u043e\u0435 View, \u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 BottomSheetBehavior, \u0432\u0441\u0435 \u0435\u0449\u0451 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u0443\u044e \u0432\u044c\u044e\u0445\u0443, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0432\u0430\u044f View \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0441\u043a\u0440\u043e\u043b\u043b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0430\u044f \u2014 \u043d\u0435\u0442. \u041f\u0440\u0438\u0447\u0438\u043d\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>  <\/p>\n<h1 id=\"ispravlenie\">\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c? \u041d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0443\u044e view \u0432 Recycler-\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438, \u043d\u043e \u0442\u0430\u043a \u043a\u0430\u043a BottomSheetBehavior \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u044b\u0431\u043e\u0440\u0430: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043a\u043b\u0430\u0441\u0441, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0441\u0432\u043e\u0439 \u043c\u0435\u0442\u043e\u0434) \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Java Reflection API. \u041e\u0431\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043d\u0435\u043e\u0447\u0435\u043d\u044c, \u043d\u043e \u0432\u044b\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0434\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"java-reflection-api\">Java Reflection API<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7ac\/35d\/b70\/7ac35db70ba880aa46fd27fdaedc2b71.jpg\" alt=\"ReflectionMeme\"><\/p>\n<p>  <\/p>\n<p>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 Java Reflection API, \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 TestBeahvior, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0432 Runtime \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0443\u0447\u0435\u0441\u0442\u044c, \u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u043b\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 onStartNestedScroll, \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u043e\u0439 \u0432 onNestedPreScroll.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">import android.content.Context; import android.util.AttributeSet; import android.view.View;  import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.coordinatorlayout.widget.CoordinatorLayout;  import com.google.android.material.bottomsheet.BottomSheetBehavior;  import java.lang.ref.WeakReference; import java.lang.reflect.Field;  public class TestBeahvior&lt;V extends View&gt; extends BottomSheetBehavior&lt;V&gt; {      public TestBeahvior(@NonNull Context context, @Nullable AttributeSet attrs) {         super(context, attrs);     }      @Override     public boolean onStartNestedScroll(             @NonNull CoordinatorLayout coordinatorLayout,             @NonNull V child,             @NonNull View directTargetChild,             @NonNull View target,             int axes,             int type) {         try {             Field nestedScrollingChildRefField = this.getClass().getSuperclass().getDeclaredField(&quot;nestedScrollingChildRef&quot;);             nestedScrollingChildRefField.setAccessible(true);             nestedScrollingChildRefField.set(this, new WeakReference&lt;&gt;(target));         } catch (NoSuchFieldException | IllegalAccessException e) {             e.printStackTrace();         }         return super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, axes, type);     } }<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"kopipast\">\u041a\u043e\u043f\u0438\u043f\u0430\u0441\u0442<\/h2>\n<p>  <\/p>\n<p>\u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441 BottomSheetBehavior, \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c private \u043c\u0435\u0442\u043e\u0434 refreshNestedScrollingChildRef, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u0441\u044b\u043b\u043a\u0438, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 onStartNestedScroll. \u0413\u043e\u0442\u043e\u0432\u043e, \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"java\">private void refreshNestedScrollingChildRef(View view) {     nestedScrollingChildRef = new WeakReference&lt;&gt;(view); }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"java\">    @Override     public boolean onStartNestedScroll(             @NonNull CoordinatorLayout coordinatorLayout,             @NonNull V child,             @NonNull View directTargetChild,             @NonNull View target,             int axes,             int type) {         refreshNestedScrollingChildRef(target);         ...     }<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Android \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0445 \u0438 \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e. \u0412\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043a\u0435\u0439\u0441 \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043a\u0430\u043a \u0438 \u0432 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432!<\/p>\n<p><cut><\/cut><\/div>\n<p> \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\/post\/487650\/\"> https:\/\/habr.com\/ru\/post\/487650\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/487650\/\">\n<p>\u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043a\u0430\u0436\u0434\u044b\u0439, \u043b\u044e\u0431\u0443\u044f\u0441\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c\u0438 \u0438 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043b\u0430\u0432\u043d\u043e \u0441\u044a\u0435\u0437\u0436\u0430\u044e\u0449\u0438\u043c\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043e\u043a\u043e\u0448\u043a\u0430\u043c\u0438, \u0442\u0443\u043b\u0431\u0430\u0440\u0430\u043c\u0438 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u044c\u044e\u0445\u0430\u043c\u0438, \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0434\u0430\u0436\u0435 \u0447\u0442\u043e-\u0442\u043e \u0447\u0438\u0442\u0430\u043b \u043f\u0440\u043e CoordianatorLayout, \u043f\u0440\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 Behaivor, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u043b\u0448\u0435\u0431\u0441\u0442\u0432\u043e \u043d\u0430 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u043e\u0432\u0441\u043a\u0438\u0445 \u0432\u044c\u044e\u0445\u0430\u0445. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0432\u044c\u044e\u0445\u0438, \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0432\u043e\u0438\u043c \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u0442\u0432\u043e\u0438\u043c\u0438 \u0437\u043d\u0430\u043d\u0438\u044f\u043c\u0438 \u0432 Android \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u041d\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u2014 \u0432\u0440\u0435\u043c\u044f, \u043d\u0435 \u0431\u0443\u0434\u0435\u0448\u044c \u0436\u0435 \u0442\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u0443\u044e \u0432\u044c\u044e\u0445\u0443 \u043d\u0430 \u0445\u0430\u043a\u0430\u0442\u043e\u043d\u0435, \u0432 \u0433\u043e\u0440\u044f\u0449\u0435\u043c \u043f\u043e \u0441\u0440\u043e\u043a\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u0432\u044c\u044e\u0445\u0430\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0441\u0432\u043e\u0435\u043d\u044b \u043d\u0435 \u0437\u0430 \u0441\u0430\u043c\u044b\u0439 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0441\u0440\u043e\u043a \u0447\u043b\u0435\u043d\u0430\u043c\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0438 \u0441\u0430\u043c\u043e\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 \u043d\u0435 \u0432\u044b\u043f\u0435\u043d\u0434\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b Android, \u0442\u0430\u043c \u0436\u0435 \u0441\u043c\u044b\u0448\u043b\u0451\u043d\u043d\u044b\u0435 \u0440\u0435\u0431\u044f\u0442\u0430 \u0441\u0438\u0434\u044f\u0442, \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0432 \u0448\u043e\u043a\u043e\u043b\u0430\u0434\u0435 (\u043d\u0443 \u0438\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u0430\u0434\u043e\u0441\u0442\u044f\u0445 \u0430\u043d\u0434\u0440\u043e\u0438\u0434\u0430). <\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043d\u0435 \u0432\u0441\u0451 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e, \u0442\u0443\u0442 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0451 \u0431\u043b\u0438\u0437\u043a\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043c\u0430\u0433\u0438\u0435\u0439 \u0442\u0430\u043a\u0438\u0445 \u0440\u0435\u0431\u044f\u0442, \u043a\u0430\u043a CoordinatorLayout, BottomSheetBehavior, \u0430 \u0442\u043e\u0447\u043d\u0435\u0435 \u0441 \u0431\u0430\u0433\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0438\u0437 \u0432\u0438\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u0438\u0445 \u043f\u0438\u0441\u0430\u043b\u0438. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0433\u0430, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 view-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c BottomSheetBehavior, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-298432","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298432","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=298432"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298432\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}