package com.stylepoints.habittracker;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class EventNewActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_event_new);
    }
}

@@ -51,66 +51,238 @@
 oid.
-support.v7.app.AppCompatActivity;%0Aimport android.os.Bundle
+content.Intent;%0Aimport android.graphics.Bitmap;%0Aimport android.provider.MediaStore;%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.os.Bundle;%0Aimport android.view.View;%0A%0Aimport static android.app.Activity.RESULT_OK
 ;%0A%0Ap
@@ -513,10 +513,877 @@
 ;%0A    %7D%0A
-%7D
+%0A    /**%0A     * Called when the user taps the Send button%0A     */%0A    public void takePhoto(View view) %7B //modify for photo%0A        // Do something in response to button%0A        int cap = 1;%0A%0A        private void dispatchTakePictureIntent %7B%0A            Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);%0A            if (takePictureIntent.resolveActivity(getPackageManager()) != null) %7B%0A                startActivityForResult(takePictureIntent, cap);%0A            %7D%0A        %7D%0A%0A        @Override%0A        protected void onActivityResult(int requestCode, int resultCode, Intent data) %7B%0A            if (requestCode == cap && resultCode == RESULT_OK) %7B%0A               Bundle extras = data.getExtras();%0A                 imageBitmap = (Bitmap) extras.get(%22data%22);%0A                mImageView.setImageBitmap(imageBitmap);%0A            %7D%0A        %7D%0A    %7D%0A%0A%0A%0A%0A%0A%0A
 %0A

Add files via upload