Last active
October 26, 2016 20:05
-
-
Save marcherdiego/93950f999ef26902f28520eba154274c to your computer and use it in GitHub Desktop.
Taller parte 1: layouts
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
<TextView | |
android:id="@+id/textView" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_alignParentLeft="true" | |
android:layout_alignParentStart="true" | |
android:layout_alignParentTop="true" | |
android:text="Camera Activity !"/> |
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
<Button | |
android:id="@+id/button" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_alignParentLeft="true" | |
android:layout_alignParentStart="true" | |
android:layout_alignParentTop="true" | |
android:onClick="tomarFoto" | |
android:text="Tomar foto"/> |
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
import android.content.Intent; | |
import android.view.View; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
public class MainActivity extends AppCompatActivity { | |
... | |
public void tomarFoto(View view) { | |
Intent intent = new Intent(this, CameraActivity.class); | |
startActivity(intent); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment