Created
September 30, 2016 18:47
-
-
Save ericksprengel/a506ab89229e2f494cf9ebdef6582720 to your computer and use it in GitHub Desktop.
AndroidA02ApB - Padding vs Margin
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" | |
android:id="@+id/activity_main" | |
android:orientation="vertical" | |
android:background="#fcc" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<ImageView | |
android:id="@+id/imageView" | |
android:background="#ccf" | |
android:src="@drawable/sample" | |
android:padding="20dp" | |
android:layout_margin="30dp" | |
android:layout_width="500px" | |
android:layout_height="500px" /> | |
<TextView | |
android:background="#cfc" | |
android:text="Estou embaixo de vc." | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_below="@id/imageView" | |
android:layout_alignParentEnd="true" | |
android:layout_marginEnd="36dp" /> | |
<TextView | |
android:background="#cfc" | |
android:text="Estou ao seu lado esquerdo" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_toRightOf="@id/imageView" /> | |
</RelativeLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment