Skip to content

Commit

Permalink
代码优化
Browse files Browse the repository at this point in the history
  • Loading branch information
“xiaohaibin committed Dec 12, 2018
1 parent 79cca86 commit cbd5266
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 24
compileSdkVersion 26
defaultConfig {
applicationId "com.stx.xhb.takephoto"
minSdkVersion 14
targetSdkVersion 24
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -20,7 +20,7 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:24.2.1'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation project(':library')
}
7 changes: 1 addition & 6 deletions app/src/main/java/com/stx/xhb/takephoto/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
package com.stx.xhb.takephoto;

import android.Manifest;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
Expand All @@ -32,6 +26,7 @@ public void onClick(View view) {
chooseImageDialog.setOperator(new ChooseImageDialog.Operator() {
@Override
public void onGetImage(String imaePath) {
Log.i("===>path",imaePath);
((ImageView) findViewById(R.id.iv)).setImageURI(Uri.fromFile(new File(imaePath)));
Toast.makeText(MainActivity.this, imaePath, Toast.LENGTH_SHORT).show();
}
Expand Down
6 changes: 3 additions & 3 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 24
compileSdkVersion 26
defaultConfig {
minSdkVersion 14
targetSdkVersion 24
targetSdkVersion 26
versionCode 1
versionName "1.0"

Expand All @@ -23,5 +23,5 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:24.2.1'
implementation 'com.android.support:appcompat-v7:26.1.0'
}

0 comments on commit cbd5266

Please sign in to comment.