I am currently using a layout that contains a RelativeLayout inside a ScrollView.
I want the RelativeLayout to be contained 5dp away from the bottom of the ScrollView so it does not overlap the background I have behind it, to achieve this I was using this XML:
<ScrollView
android:id="@+id/scrollView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/backgroundView1"
android:fadingEdge="none"
android:scrollbars="none"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<RelativeLayout
android:id="@+id/innerLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</RelativeLayout>
</ScrollView>
This worked perfectly, however I no longer need the padding at the top. When removing the paddingTop line, the paddingBottom no longer functions. Even if I set the paddingBottom to 100dp it shows no effect on my layout.
I tried paddingTop="0dp" and that did not fix the issue either, it seems paddingBottom will only work when paddingTop is above 0.
Anyone got any ideas as to why paddingBottom does not work without paddingTop?