Created
December 18, 2015 12:23
-
-
Save pacificregmi/f1aaf5dc0ebd8f49e134 to your computer and use it in GitHub Desktop.
How to Capture Image from Android Camera and Display it Programmatically - capture_image_from_camera_and_display.xml
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:orientation="vertical" android:layout_width="match_parent" | |
android:gravity="center_horizontal" | |
android:layout_margin="16dp" | |
android:layout_height="match_parent"> | |
<TextView | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="Click the below button to take photo from camera and display it in image view"/> | |
<Button | |
android:id="@+id/take_image_from_camera" | |
android:layout_width="wrap_content" | |
android:layout_marginTop="10dp" | |
android:onClick="takeImageFromCamera" | |
android:layout_height="wrap_content" | |
android:text="Take Photo From Camera"/> | |
<ImageView | |
android:id="@+id/image_from_camera" | |
android:layout_width="200dp" | |
android:src="@drawable/image" | |
android:layout_height="300dp" | |
android:layout_marginTop="16dp"/> | |
<TextView | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
android:text="ViralAndroid.com" | |
android:autoLink="web" | |
android:textSize="24sp" | |
android:textStyle="bold" | |
android:gravity="center|bottom"/> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment