Skip to content

Commit

Permalink
Release V1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbbc committed Jul 25, 2017
1 parent 98d22ea commit 9199e70
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 55 deletions.
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@
<a href="art/18.png"><img src="art/18.png" width="30%"/></a>

## 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)
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ android {
vectorDrawables.useSupportLibrary = true

ndk {
abiFilters 'armeabi-v7a' /*, 'x86' */
abiFilters 'armeabi-v7a'/* , 'x86' */
}
}
signingConfigs {
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,6 @@ class UploaderActivity : BaseActivity() {
var isAvatarInBounds = true
var transitionIn = true

val callback = object: SharedElementCallback() {

override fun onMapSharedElements(names: MutableList<String>, sharedElements: MutableMap<String, View>) {
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<String>?, sharedElements: MutableList<View>, sharedElementSnapshots: MutableList<View>?) {
window.enterTransition = makeEnterTransition(sharedElements.find { it is ImageView }!!)
}
}

companion object {
const val ARG_USER_ID = "user_id"
const val ARG_USERNAME = "username"
Expand Down Expand Up @@ -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<String>, sharedElements: MutableMap<String, View>) {
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<String>?, sharedElements: MutableList<View>, sharedElementSnapshots: MutableList<View>?) {
window.enterTransition = makeEnterTransition(sharedElements.find { it is ImageView }!!)
}
})
window.enterTransition.duration = 400
} else {
GlideApp.with(this)
.load(headerBg)
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
.listener(object: RequestListener<Drawable> {
.listener(object : RequestListener<Drawable> {
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean {
return false
}

override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, 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
}
Expand All @@ -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
Expand Down Expand Up @@ -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<Drawable> {
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean {
return false
}

override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, 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<Drawable> {
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean {
return false
}

override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, 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)
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## 更新历史

### V1.1.0
- 修复:Android 4.4搜索闪退问题
- 修复:离线播放不能旋转屏幕的Bug
- 新增:登陆
- 新增:发送评论
- 新增:查看Up主视频
- 优化:搜索页默认显示历史记录
- 优化:视频播放页添加滚动

### V1.0.9
- 修复排行榜闪退问题
- 修复大文件不能下载的问题
Expand Down

0 comments on commit 9199e70

Please sign in to comment.