I have a `BottomSheetDialogFragment`, which has some content and a blue button (`TextView`) on the bottom. I want it to be always anchored to the bottom of the `BottomSheetDialogFragment`, yet I was unable to do so.. Most of the time it's in the right place, but sometimes it appears to be a bit below, like on this screenshot below:

[![enter image description here](https://i.stack.imgur.com/x0uQk.png)](https://i.stack.imgur.com/x0uQk.png)

How can I make sure that the blue button is always anchored to the bottom of `BottomSheetDialogFragment` no matter what? The root view is `RelativeLayout`, and when I tried setting `android:layout_alignParentBottom="true"`, but it didn't work out.