Skip to content

Instantly share code, notes, and snippets.

@toreki
Last active March 16, 2017 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toreki/c1e6fbe7216244b1ebb1de088f274312 to your computer and use it in GitHub Desktop.
Save toreki/c1e6fbe7216244b1ebb1de088f274312 to your computer and use it in GitHub Desktop.
Udacity - Android - Make Your Own Card
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
android:background="#f8d613"
tools:context=".MainActivity"
>
<ImageView
android:src="@drawable/toreki"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_gravity="top"
android:layout_marginTop="16dp"
android:layout_marginLeft="32dp"
android:layout_marginRight="32dp"
android:scaleType="centerInside"
/>
<TextView
android:text="Attila Töreki"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_marginTop="16dp"
android:textAlignment="center"
android:textColor="@android:color/black"
android:fontFamily="sans-serif-light"
android:textSize="34sp"
/>
<TextView
android:text="android developer :-)"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textAlignment="center"
android:textColor="@android:color/black"
android:fontFamily="sans-serif-light"
android:textSize="24sp"
/>
<TextView
android:text="atoreki@gmail.com"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:textAlignment="center"
android:textColor="@android:color/black"
android:fontFamily="sans-serif-light"
android:textSize="14sp"
/>
</LinearLayout>
<?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="#f8d613"
android:padding="16dp"
tools:context=".MainActivity"
>
<ImageView
android:id="@+id/photo"
android:src="@drawable/toreki"
android:layout_width="200dp"
android:layout_height="200dp"
android:scaleType="centerCrop"
/>
<TextView
android:id="@+id/name"
android:text="Attila Töreki"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/photo"
android:layout_alignParentTop="true"
android:layout_marginLeft="16dp"
android:textColor="@android:color/black"
android:fontFamily="sans-serif-light"
android:textSize="34sp"
/>
<TextView
android:id="@+id/job"
android:text="android developer :-)"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/photo"
android:layout_below="@id/name"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:textColor="@android:color/black"
android:fontFamily="sans-serif-light"
android:textSize="24sp"
/>
<TextView
android:id="@+id/email"
android:text="atoreki@gmail.com"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/photo"
android:layout_below="@id/job"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:textColor="@android:color/black"
android:fontFamily="sans-serif-light"
android:textSize="14sp"
/>
</RelativeLayout>
https://discussions.udacity.com/t/make-your-own-card/19643/2579
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment