Last active
April 12, 2018 07:07
-
-
Save susanas/0ae80a53755b8eb2c9a237c278a06e85 to your computer and use it in GitHub Desktop.
Project 1: HelloAndroid
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"?> | |
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#FFFFFFFF" | |
tools:context="com.example.android.helloandroid.MainActivity"> | |
<ImageView | |
android:id="@+id/drawable" | |
app:layout_constraintTop_toTopOf="parent" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:src="@drawable/udacityoffice" | |
android:scaleType="fitStart" /> | |
<TextView | |
android:id="@+id/uda" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Udacity" | |
android:textStyle="bold" | |
android:textAllCaps="true" | |
android:fontFamily="sans-serif" | |
android:textSize="22dp" | |
android:layout_marginBottom="4dp" | |
android:layout_marginLeft="8dp" | |
app:layout_constraintBottom_toTopOf="@+id/adr" | |
app:layout_constraintLeft_toLeftOf="parent" /> | |
<TextView | |
android:id="@+id/adr" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="2465 Latham St\nMountain View, CA 94043\n650-555-5555\nww.udacity.com" | |
android:fontFamily="sans-serif" | |
android:textSize="18dp" | |
android:layout_marginLeft="8dp" | |
android:layout_marginBottom="16dp" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintBottom_toBottomOf="parent" /> | |
</android.support.constraint.ConstraintLayout> |
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"?> | |
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:background="#FFFFFFFF" | |
tools:context="com.example.android.helloandroid.MainActivity"> | |
<ImageView | |
android:id="@+id/drawable" | |
app:layout_constraintTop_toTopOf="parent" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:src="@drawable/udacityoffice" | |
android:scaleType="fitStart" /> | |
<TextView | |
android:id="@+id/uda" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Udacity" | |
android:textStyle="bold" | |
android:textAllCaps="true" | |
android:fontFamily="sans-serif" | |
android:textSize="22dp" | |
android:layout_marginBottom="4dp" | |
android:layout_marginLeft="8dp" | |
app:layout_constraintBottom_toTopOf="@+id/adr" | |
app:layout_constraintLeft_toLeftOf="parent" /> | |
<TextView | |
android:id="@+id/adr" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="2465 Latham St\nMountain View, CA 94043\n650-555-5555\nww.udacity.com" | |
android:fontFamily="sans-serif" | |
android:textSize="18dp" | |
android:layout_marginLeft="8dp" | |
android:layout_marginBottom="16dp" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintBottom_toBottomOf="parent" /> | |
</android.support.constraint.ConstraintLayout> |
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
package com.example.android.helloandroid; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
public class MainActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment