diff --git a/app/src/main/java/com/starot/wechat/DefAct.kt b/app/src/main/java/com/starot/wechat/DefAct.kt index 1e7e936..f8c3ac4 100644 --- a/app/src/main/java/com/starot/wechat/DefAct.kt +++ b/app/src/main/java/com/starot/wechat/DefAct.kt @@ -54,8 +54,11 @@ class DefAct : AppCompatActivity() { private fun startAct(index: Int, images: ArrayList) { val intent = Intent(this, DefLargerAct::class.java) + //传入图片信息 这里可所以类型 intent.putStringArrayListExtra(LargerAct.IMAGE, images) + //传入当前的 index 用于处理viewpager2 务必添加 intent.putExtra(LargerAct.INDEX, index) + //传入图片的位置信息,点击以后的动画效果需要 务必添加 intent.putParcelableArrayListExtra( LargerAct.ORIGINAL, arrayListOf( diff --git a/app/src/main/java/com/starot/wechat/larger/DefLargerAct.kt b/app/src/main/java/com/starot/wechat/larger/DefLargerAct.kt index 7e84a6d..71135bf 100644 --- a/app/src/main/java/com/starot/wechat/larger/DefLargerAct.kt +++ b/app/src/main/java/com/starot/wechat/larger/DefLargerAct.kt @@ -47,7 +47,6 @@ class DefLargerAct : LargerAct() { //Glide 加载图片的进度 具体可参考代码 ProgressInterceptor.addListener(data, object : ProgressListener { override fun onProgress(progress: Int) { - Log.i(TAG, "图片加载进度 $progress ${Thread.currentThread().name}") progressView.visibility = View.VISIBLE progressView.progress = progress } diff --git a/app/src/main/res/layout/activity_def.xml b/app/src/main/res/layout/activity_def.xml index b8d515a..be169f9 100644 --- a/app/src/main/res/layout/activity_def.xml +++ b/app/src/main/res/layout/activity_def.xml @@ -8,7 +8,6 @@