From 9199e7035028d9f454298f0bf4eff5e941623125 Mon Sep 17 00:00:00 2001 From: blackbbc <505968815@qq.com> Date: Tue, 25 Jul 2017 15:53:49 +0800 Subject: [PATCH] Release V1.0.0 --- README.md | 10 +-- app/build.gradle | 4 +- .../business/uploader/UploaderActivity.kt | 87 ++++++++++--------- .../video/viewmodel/VideoInfoViewModel.kt | 2 +- changelog.md | 9 ++ 5 files changed, 57 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index e1efc4c..2bd2112 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,7 @@ ## TODO -- [x] 修复排行榜闪退问题(V1.0.9) -- [x] 修复大文件不能下载的问题(V1.0.9) -- [x] 修复Android 4.4及以下搜索闪退问题(V1.0.9) -- [x] 添加缓冲进度条(V1.0.9) -- [x] 减少滑动手势调整的播放进度幅度(V1.0.9) -- [x] 播放设置新增弹幕速度(V1.0.9) -- [x] 播放设置新增解码方式(V1.0.9) -- [x] 优化播放器播放参数,减少视频加载时间(V1.0.9) -- [x] 修复Android 4.4搜索闪退问题 +- [x] 修复Android 4.4搜索闪退问题(V1.1.0) - [x] 修复离线播放不能旋转屏幕的Bug(V1.1.0) - [x] 登陆(V1.1.0) - [x] 发送评论(V1.1.0) diff --git a/app/build.gradle b/app/build.gradle index 2e12d53..9b39422 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,7 +19,7 @@ android { vectorDrawables.useSupportLibrary = true ndk { - abiFilters 'armeabi-v7a' /*, 'x86' */ + abiFilters 'armeabi-v7a'/* , 'x86' */ } } signingConfigs { @@ -75,7 +75,7 @@ dependencies { implementation project(':applier') /* GSYVideoPlayer */ implementation project(':gsyVideoPlayer') - implementation 'com.android.support:multidex:1.0.1' + implementation 'com.android.support:multidex:1.0.2' /* Support Library */ implementation "com.android.support:appcompat-v7:$support_version" implementation "com.android.support:recyclerview-v7:$support_version" diff --git a/app/src/main/kotlin/me/sweetll/tucao/business/uploader/UploaderActivity.kt b/app/src/main/kotlin/me/sweetll/tucao/business/uploader/UploaderActivity.kt index 410dfea..b2db5bf 100644 --- a/app/src/main/kotlin/me/sweetll/tucao/business/uploader/UploaderActivity.kt +++ b/app/src/main/kotlin/me/sweetll/tucao/business/uploader/UploaderActivity.kt @@ -56,26 +56,6 @@ class UploaderActivity : BaseActivity() { var isAvatarInBounds = true var transitionIn = true - val callback = object: SharedElementCallback() { - - override fun onMapSharedElements(names: MutableList, sharedElements: MutableMap) { - super.onMapSharedElements(names, sharedElements) - if (transitionIn) { - transitionIn = false - } else { - if (!isAvatarInBounds) { - names.clear() - sharedElements.clear() - } - } - } - - @RequiresApi(Build.VERSION_CODES.LOLLIPOP) - override fun onSharedElementStart(sharedElementNames: MutableList?, sharedElements: MutableList, sharedElementSnapshots: MutableList?) { - window.enterTransition = makeEnterTransition(sharedElements.find { it is ImageView }!!) - } - } - companion object { const val ARG_USER_ID = "user_id" const val ARG_USERNAME = "username" @@ -110,23 +90,44 @@ class UploaderActivity : BaseActivity() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { initTransition() - setEnterSharedElementCallback(callback) + setEnterSharedElementCallback(object : SharedElementCallback() { + + override fun onMapSharedElements(names: MutableList, sharedElements: MutableMap) { + super.onMapSharedElements(names, sharedElements) + if (transitionIn) { + transitionIn = false + } else { + if (!isAvatarInBounds) { + names.clear() + sharedElements.clear() + } + } + } + + @RequiresApi(Build.VERSION_CODES.LOLLIPOP) + override fun onSharedElementStart(sharedElementNames: MutableList?, sharedElements: MutableList, sharedElementSnapshots: MutableList?) { + window.enterTransition = makeEnterTransition(sharedElements.find { it is ImageView }!!) + } + }) window.enterTransition.duration = 400 } else { GlideApp.with(this) .load(headerBg) .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC) - .listener(object: RequestListener { + .listener(object : RequestListener { override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { return false } override fun onResourceReady(resource: Drawable?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { + if (isFirstResource) { + return false + } binding.headerImg.alpha = 0f binding.headerImg.setImageDrawable(resource) binding.headerImg.animate() .alpha(1f) - .setDuration(2000) + .setDuration(200) .start() return true } @@ -137,7 +138,7 @@ class UploaderActivity : BaseActivity() { setupRecyclerView() binding.collapsingToolbar.setCollapsedTitleTextColor(Color.WHITE) - binding.appBar.addOnOffsetChangedListener(object: AppBarLayout.OnOffsetChangedListener { + binding.appBar.addOnOffsetChangedListener(object : AppBarLayout.OnOffsetChangedListener { val EXPANDED = 1 shl 0 val COLLAPSED = 1 shl 1 val IDLE = 1 shl 2 @@ -230,27 +231,27 @@ class UploaderActivity : BaseActivity() { circularReveal.addTarget(binding.appBar) val headerBg = intent.getStringExtra(ARG_HEADER_BG) - circularReveal.addListener(object: TransitionListenerAdapter() { + circularReveal.addListener(object : TransitionListenerAdapter() { override fun onTransitionEnd(transition: Transition?) { GlideApp.with(this@UploaderActivity) - .load(headerBg) - .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC) - .listener(object: RequestListener { - override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { - return false - } - - override fun onResourceReady(resource: Drawable?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { - binding.headerImg.alpha = 0f - binding.headerImg.setImageDrawable(resource) - binding.headerImg.animate() - .alpha(1f) - .setDuration(2000) - .start() - return true - } - }) - .into(binding.headerImg) + .load(headerBg) + .diskCacheStrategy(DiskCacheStrategy.AUTOMATIC) + .listener(object : RequestListener { + override fun onLoadFailed(e: GlideException?, model: Any?, target: Target?, isFirstResource: Boolean): Boolean { + return false + } + + override fun onResourceReady(resource: Drawable?, model: Any?, target: Target?, dataSource: DataSource?, isFirstResource: Boolean): Boolean { + binding.headerImg.alpha = 0f + binding.headerImg.setImageDrawable(resource) + binding.headerImg.animate() + .alpha(1f) + .setDuration(2000) + .start() + return true + } + }) + .into(binding.headerImg) } }) diff --git a/app/src/main/kotlin/me/sweetll/tucao/business/video/viewmodel/VideoInfoViewModel.kt b/app/src/main/kotlin/me/sweetll/tucao/business/video/viewmodel/VideoInfoViewModel.kt index 75194cf..e01bd94 100644 --- a/app/src/main/kotlin/me/sweetll/tucao/business/video/viewmodel/VideoInfoViewModel.kt +++ b/app/src/main/kotlin/me/sweetll/tucao/business/video/viewmodel/VideoInfoViewModel.kt @@ -165,7 +165,7 @@ class VideoInfoViewModel(val videoInfoFragment: VideoInfoFragment): BaseViewMode fun onClickUser(view: View) { if (headerBg.isNotEmpty()) { - val options: Bundle = ActivityOptionsCompat.makeSceneTransitionAnimation( + val options: Bundle? = ActivityOptionsCompat.makeSceneTransitionAnimation( videoInfoFragment.activity, view.findViewById(R.id.avatarImg), "transition_avatar" ).toBundle() UploaderActivity.intentTo(videoInfoFragment.activity, result.get().userid, result.get().user, avatar.get(), signature, headerBg, options) diff --git a/changelog.md b/changelog.md index dbeed77..cf8470b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,14 @@ ## 更新历史 +### V1.1.0 +- 修复:Android 4.4搜索闪退问题 +- 修复:离线播放不能旋转屏幕的Bug +- 新增:登陆 +- 新增:发送评论 +- 新增:查看Up主视频 +- 优化:搜索页默认显示历史记录 +- 优化:视频播放页添加滚动 + ### V1.0.9 - 修复排行榜闪退问题 - 修复大文件不能下载的问题