Skip to content

Commit

Permalink
Cleaned up a few tiny things, changed the support email, and added a …
Browse files Browse the repository at this point in the history
…texture to the about page
  • Loading branch information
Robert Montefusco committed Sep 19, 2016
1 parent 2aec28f commit df0cfc5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ android {
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/cs371m/chromavision/MainMenuActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,12 @@ private Bitmap resizeImageToScreen(Bitmap scale) {
double screenWidth = dm.widthPixels;
double screenHeight = dm.heightPixels;

if (screenWidth >= 1440) {
screenWidth = 1080;
double bigScreenScale = screenHeight / screenWidth;
screenHeight = bigScreenScale * 1080;
screenWidth = 1080;
}
// // Enables strict scaling of images
// if (screenWidth >= 720) {
// screenWidth = 720;
// double bigScreenScale = screenHeight / screenWidth;
// screenHeight = bigScreenScale * 720;
// }

int width = scale.getWidth();
int height = scale.getHeight();
Expand Down
11 changes: 10 additions & 1 deletion app/src/main/java/cs371m/chromavision/ResultActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,19 @@ public boolean onTouch(View view, MotionEvent motionEvent){
mImageView.setImageURI(pictureUri);
}

InputStream cameraInput = null;
try {
cameraInput = getContentResolver().openInputStream(pictureUri);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Bitmap scale = BitmapFactory.decodeStream(cameraInput);

System.out.println(scale.getWidth() + " " + scale.getHeight());

mTextView = (TextView)findViewById(R.id.colorDataView);

mRunPicture = new GenerateColorDataAsync();
// generateColorData(picture);
mRunPicture.execute(pictureUri);

}
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
android:background="@drawable/grey_squares_repeating" >

<TextView
android:layout_width="match_parent"
Expand All @@ -27,7 +28,7 @@
android:layout_height="0dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="20sp"
android:text="An app by:\nRobert Montefusco\nTony Sampson\nYajie Niu\n\nFor CS371M Mobile Computing\nat the University of Texas at Austin\n\nAnd for those who need help with colors!\n\n\nSupport email: [email protected]"
android:text="An app by:\nRobert Montefusco\nTony Sampson\nYajie Niu\n\nFor CS371M Mobile Computing\nat the University of Texas at Austin\n\nAnd for those who need help with colors!\n\n\nSupport email: [email protected]"
android:layout_weight="0.6"
android:gravity="center_horizontal"
android:id="@+id/textView2"
Expand Down

0 comments on commit df0cfc5

Please sign in to comment.