I have a floating bottom navigation with transparent background and i want to make scroll view overscrolls until elements in my scroll view gets on top of bottom navigation.
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.cardview.widget.CardView>
...
</androidx.cardview.widget.CardView>
</LinearLayout>
</ScrollView>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="40dp"
android:background="@drawable/bottom_navigation_background"
app:itemIconTint="@drawable/bottom_navigation_color_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/bottom_nav_menu"/>
adding padding bottom and setting clipToPadding to false did the trick
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="always"
android:paddingBottom="100dp"
android:clipToPadding="false"/>