diff --git a/README.md b/README.md index 0d58caa..d746377 100755 --- a/README.md +++ b/README.md @@ -48,11 +48,11 @@ https://github.com/user-attachments/assets/070caa63-8e9f-4b11-9240-4cb56440d3c2 } ``` #### Step 2. 在你app的build.gradle中添加依赖: -当前最新版本为:```androidx-8.0.0``` +当前最新版本为:```androidx-8.0.1``` ``` dependencies { // 本框架 - implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-8.0.0' + implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-8.0.1' // glide implementation 'com.github.bumptech.glide:glide:4.16.0' diff --git a/library/src/main/java/cc/shinichi/library/view/ImagePreviewActivity.kt b/library/src/main/java/cc/shinichi/library/view/ImagePreviewActivity.kt index 9bb5c14..13443e1 100755 --- a/library/src/main/java/cc/shinichi/library/view/ImagePreviewActivity.kt +++ b/library/src/main/java/cc/shinichi/library/view/ImagePreviewActivity.kt @@ -336,6 +336,7 @@ class ImagePreviewActivity : AppCompatActivity(), Handler.Callback, View.OnClick } ImagePreview.instance.onPageFinishListener?.onFinish(this) ImagePreview.instance.reset() + context.overridePendingTransition(R.anim.fade_in, R.anim.fade_out) } override fun onDestroy() { @@ -643,17 +644,11 @@ class ImagePreviewActivity : AppCompatActivity(), Handler.Callback, View.OnClick } companion object { - fun activityStart(context: Context?) { - if (context == null) { - return - } + fun activityStart(context: Activity) { val intent = Intent() intent.setClass(context, ImagePreviewActivity::class.java) - // 默认动画 context.startActivity(intent) - if (context is Activity) { - context.overridePendingTransition(R.anim.fade_in, R.anim.fade_out) - } + context.overridePendingTransition(R.anim.fade_in, R.anim.fade_out) } } } \ No newline at end of file diff --git a/sample/build.gradle b/sample/build.gradle index fecc992..3657dd6 100755 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -23,8 +23,8 @@ android { applicationId "cc.shinichi.bigimageviewpager" minSdkVersion 24 targetSdkVersion 34 - versionCode 800 - versionName "androidx-8.0.0" + versionCode 801 + versionName "androidx-8.0.1" signingConfig signingConfigs.debug multiDexEnabled true } @@ -79,6 +79,6 @@ dependencies { implementation "androidx.media3:media3-ui:1.4.1" // library - // implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-7.3.0' + // implementation 'com.github.SherlockGougou:BigImageViewPager:androidx-8.0.1' implementation project(':library') } \ No newline at end of file