I have wrapped an activity in an scroll view
like following.
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
>
<include layout="@layout/content_form" />
</ScrollView>
I have around 15 fields in the content_form
layout, the issues is that the last item in content_form
layout is attached with bottom.
I need to add a margin below the scroll view, i have tried giving margin to scrollview
and the last item of content_form
field, but nothing is working.
I need to know how to add margin at the bottom of page when using scroll view
.
If you want the scrolling margin to be within the content, it would be best to add it to content_form
. You should be able to accomplish this by either adding paddingBottom
to your parent container in that layout, or layout_marginBottom
on your last view aligned to the parent bottom.
This make padding under the last item in scroll view. may be good for you
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:paddingBottom="80dp"
android:clipToPadding="false"
android:layout_height="match_parent">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With