Skip to content

Commit

Permalink
androidx-6.1.4 优化reset逻辑,更新部分依赖版本。
Browse files Browse the repository at this point in the history
  • Loading branch information
SherlockGougou committed Jan 19, 2021
1 parent 62ee6f0 commit e0ab915
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.exifinterface:exifinterface:1.3.1'
implementation 'androidx.exifinterface:exifinterface:1.3.2'
api 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
// glide
implementation 'com.github.bumptech.glide:glide:4.11.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,11 @@ public void onBackPressed() {
public void finish() {
super.finish();
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);

ImagePreview.getInstance().reset();
if (imagePreviewAdapter != null) {
imagePreviewAdapter.closePage();
}
}

public int convertPercentToBlackAlphaColor(float percent) {
Expand Down Expand Up @@ -500,15 +505,6 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
}
}

@Override
protected void onDestroy() {
super.onDestroy();
ImagePreview.getInstance().reset();
if (imagePreviewAdapter != null) {
imagePreviewAdapter.closePage();
}
}

private void gone() {
handlerHolder.sendEmptyMessage(3);
}
Expand Down
6 changes: 3 additions & 3 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "cc.shinichi.bigimageviewpager"
minSdkVersion 14
targetSdkVersion 29
versionCode 613
versionName "androidx-6.1.3"
versionCode 614
versionName "androidx-6.1.4"
}
buildTypes {
release {
Expand Down Expand Up @@ -50,6 +50,6 @@ dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:4.11.0'
// library
// implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-6.1.3'
// implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-6.1.4'
implementation project(':library')
}

0 comments on commit e0ab915

Please sign in to comment.