docs/basic/filling-gap.md
This topic describes how to fill the gap on top of the Toolbar, which are implemented in the following examples.
Please note that these patterns only works for Android 4+.
There are many examples for this pattern, but they can be classified to the following:
TouchInterceptionFrameLayout (one of the widgets in this library),
and this component does not handle "velocity" of scrolls,
so as soon as you touch up your fingers, translation will be stopped.<FrameLayout android:clipChildren="false">
<FrameLayout android:id="@+id/image_holder">
<ImageView android:id="@+id/image"/>
</FrameLayout>
<ObservableScrollView android:id="@+id/scroll">
<TextView android:id="@+id/container"/>
</ObservableScrollView>
<FrameLayout android:id="@+id/header" android:clipChildren="false">
<View android:id="@+id/header_background"/>
<LinearLayout android:id="@+id/header_bar">
<TextView android:id="@+id/title"/>
</LinearLayout>
</FrameLayout>
</FrameLayout>
clipChildren attribute is important.
Without it, part of the views are not drawn.
Incorrect (without android:clipChildren="false"):
Correct (with android:clipChildren="false"):
Coming soon...
Coming soon...
Coming soon...