Skip to content

Commit

Permalink
all symptom activities added
Browse files Browse the repository at this point in the history
  • Loading branch information
lydiaxing committed May 21, 2017
1 parent 5d22a76 commit f2f9458
Show file tree
Hide file tree
Showing 20 changed files with 632 additions and 74 deletions.
12 changes: 10 additions & 2 deletions app/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
<activity android:name=".CameraActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ResultsActivity"></activity>
<activity android:name=".ResultsActivity" />

<provider
android:name="android.support.v4.content.FileProvider"
Expand All @@ -26,6 +25,15 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/paths" />
</provider>

<activity android:name=".RashSymptom" />
<activity android:name=".AutoSymptom" />
<activity android:name=".BumpsSymptom" />
<activity android:name=".DrynessSymptom" />
<activity android:name=".ItchSymptom" />
<activity android:name=".PainSymptom" />
<activity android:name=".RednessSymptom" />
<activity android:name=".StiffSymptom" />
</application>

</manifest>
37 changes: 37 additions & 0 deletions app/app/src/main/java/com/eriknakamura/skinsense/AutoSymptom.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.eriknakamura.skinsense;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.CheckBox;

public class AutoSymptom extends AppCompatActivity {
CheckBox autoy;
CheckBox auton;
private Handler handler;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.auto_symptom);
autoy = (CheckBox) findViewById(R.id.autoy);
auton = (CheckBox) findViewById(R.id.auton);
handler = new Handler();
}

public void onCheckboxClicked(View view){
handler.postDelayed(changeSymptom, 500);
}

private Runnable changeSymptom = new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), ResultsActivity.class);
intent.putExtra("autoy", autoy.isChecked());
intent.putExtra("auton", auton.isChecked());
startActivity(intent);
}
};
}
37 changes: 37 additions & 0 deletions app/app/src/main/java/com/eriknakamura/skinsense/BumpsSymptom.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.eriknakamura.skinsense;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.CheckBox;

public class BumpsSymptom extends AppCompatActivity {
CheckBox bumpsy;
CheckBox bumpsn;
private Handler handler;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.bumps_symptom);
bumpsy = (CheckBox) findViewById(R.id.bumpsy);
bumpsn = (CheckBox) findViewById(R.id.bumpsn);
handler = new Handler();
}

public void onCheckboxClicked(View view){
handler.postDelayed(changeSymptom, 500);
}

private Runnable changeSymptom = new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), RednessSymptom.class);
intent.putExtra("bumpsy", bumpsy.isChecked());
intent.putExtra("bumpsn", bumpsn.isChecked());
startActivity(intent);
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,36 @@
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Environment;
import android.os.Handler;
import android.provider.MediaStore;
import android.support.v4.content.FileProvider;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;

import java.io.File;
import java.text.DateFormat;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

public class CameraActivity extends AppCompatActivity {
static final int REQUEST_TAKE_PHOTO = 1;
ImageView imageView;
Button submitInfo;
Button takePicture;
Button test;
CheckBox itchiness;
CheckBox burning;
CheckBox pain;
String currentPhotoPath;
Handler handler;
Timer timer;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_camera);
imageView = (ImageView) findViewById(R.id.imageView);

itchiness = (CheckBox) findViewById(R.id.itchiness);
burning = (CheckBox) findViewById(R.id.burning);
pain = (CheckBox) findViewById(R.id.pain);
handler = new Handler();

takePicture = (Button) findViewById(R.id.picture_button);
takePicture.setOnClickListener(new View.OnClickListener() {
Expand All @@ -49,23 +46,14 @@ public void onClick(View v) {

submitInfo = (Button) findViewById(R.id.submit_button);
submitInfo.setOnClickListener(new View.OnClickListener() {
Intent intent = new Intent(CameraActivity.this, ResultsActivity.class);
Intent intent = new Intent(CameraActivity.this, RashSymptom.class);

@Override
public void onClick(View v) {
intent.putExtra("itchiness", itchiness.isChecked());
intent.putExtra("stringPath", currentPhotoPath);
startActivity(intent);
}
});

test = (Button) findViewById(R.id.button);
test.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
setThumbnail(currentPhotoPath);
}
});
}

private void dispatchTakePictureIntent() {
Expand Down Expand Up @@ -99,7 +87,6 @@ private File createImageFile() throws Exception {


currentPhotoPath = image.getAbsolutePath();
System.out.println(currentPhotoPath);
return image;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.eriknakamura.skinsense;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.CheckBox;

public class DrynessSymptom extends AppCompatActivity {
CheckBox dryy;
CheckBox dryn;
private Handler handler;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dryness_symptom);
dryy = (CheckBox) findViewById(R.id.dryy);
dryn = (CheckBox) findViewById(R.id.dryn);
handler = new Handler();
}

public void onCheckboxClicked(View view){
handler.postDelayed(changeSymptom, 500);
}

private Runnable changeSymptom = new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), BumpsSymptom.class);
intent.putExtra("dryy", dryy.isChecked());
intent.putExtra("dryn", dryn.isChecked());
startActivity(intent);
}
};
}
37 changes: 37 additions & 0 deletions app/app/src/main/java/com/eriknakamura/skinsense/ItchSymptom.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.eriknakamura.skinsense;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.CheckBox;

public class ItchSymptom extends AppCompatActivity {
CheckBox itchy;
CheckBox itchn;
private Handler handler;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.itch_symptom);
itchy = (CheckBox) findViewById(R.id.itchy);
itchn = (CheckBox) findViewById(R.id.itchn);
handler = new Handler();
}

public void onCheckboxClicked(View view){
handler.postDelayed(changeSymptom, 500);
}

private Runnable changeSymptom = new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), PainSymptom.class);
intent.putExtra("itchy", itchy.isChecked());
intent.putExtra("itchn", itchn.isChecked());
startActivity(intent);
}
};
}
37 changes: 37 additions & 0 deletions app/app/src/main/java/com/eriknakamura/skinsense/PainSymptom.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.eriknakamura.skinsense;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.CheckBox;

public class PainSymptom extends AppCompatActivity {
CheckBox painy;
CheckBox painn;
private Handler handler;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.pain_symptom);
painy = (CheckBox) findViewById(R.id.painy);
painn = (CheckBox) findViewById(R.id.painn);
handler = new Handler();
}

public void onCheckboxClicked(View view){
handler.postDelayed(changeSymptom, 500);
}

private Runnable changeSymptom = new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), AutoSymptom.class);
intent.putExtra("painy", painy.isChecked());
intent.putExtra("painn", painn.isChecked());
startActivity(intent);
}
};
}
37 changes: 37 additions & 0 deletions app/app/src/main/java/com/eriknakamura/skinsense/RashSymptom.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.eriknakamura.skinsense;

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;

public class RashSymptom extends AppCompatActivity {
CheckBox rashy;
CheckBox rashn;
private Handler handler;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_rash_symptom);
rashy = (CheckBox) findViewById(R.id.rashy);
rashn = (CheckBox) findViewById(R.id.rashn);
handler = new Handler();
}

public void onCheckboxClicked(View view){
handler.postDelayed(changeSymptom, 500);
}

private Runnable changeSymptom = new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), DrynessSymptom.class);
intent.putExtra("rashy", rashy.isChecked());
intent.putExtra("rashn", rashn.isChecked());
startActivity(intent);
}
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.eriknakamura.skinsense;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.CheckBox;

public class RednessSymptom extends AppCompatActivity {
CheckBox redy;
CheckBox redn;
private Handler handler;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.redness_symptom);
redy = (CheckBox) findViewById(R.id.rednessy);
redn = (CheckBox) findViewById(R.id.rednessn);
handler = new Handler();
}

public void onCheckboxClicked(View view){
handler.postDelayed(changeSymptom, 500);
}

private Runnable changeSymptom = new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), StiffSymptom.class);
intent.putExtra("redy", redy.isChecked());
intent.putExtra("redn", redn.isChecked());
startActivity(intent);
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public class ResultsActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
Intent intent = getIntent();

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_results);
}
Expand Down
Loading

0 comments on commit f2f9458

Please sign in to comment.