Created
July 31, 2019 08:03
-
-
Save Razeeman/acfa7330822a53cbffdb4ab062f77373 to your computer and use it in GitHub Desktop.
Bottom margin in ScrollView
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="@drawable/background"> | |
<FrameLayout | |
android:id="@+id/frl" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" /> | |
<ScrollView | |
android:id="@+id/sv" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_marginStart="16dp" | |
android:layout_marginLeft="16dp" | |
android:layout_marginEnd="16dp" | |
android:layout_marginRight="16dp"> | |
<!-- Two layouts to create bottom margin. Doesn't work otherwise --> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginTop="44dp" | |
android:layout_marginBottom="44dp" | |
tools:ignore="UselessParent"> | |
<TextView | |
android:id="@+id/tv" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:fontFamily="@font/roboto_regular" | |
android:textColor="@color/white_color" | |
android:textSize="18sp" | |
tools:text="Test" /> | |
</LinearLayout> | |
</LinearLayout> | |
</ScrollView> | |
</RelativeLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment