Android ValueAnimator仅增加高度
使用我的下面的代码规模增加两个方面的高度。 我想增加一个方向的高度
private fun scaleView(view: View, newHeight: Int) { val animation : ValueAnimator = ValueAnimator.ofInt(view.measuredHeight, newHeight); animation.addUpdateListener(object: ValueAnimator.AnimatorUpdateListener { override fun onAnimationUpdate(valueAnimator: ValueAnimator?) { val animatedValue = valueAnimator!!.animatedValue val layoutParams: ViewGroup.LayoutParams = view.layoutParams layoutParams.height = animatedValue as Int view.layoutParams = layoutParams } }) animation.duration = SLIDE_DURATION animation.start() delay() }
- 找不到kotlin-reflect.jar(org.jetbrains.kotlin:kotlin-reflect:1.1.3-2)
- Android中的Kotlin协程的使用
- Android体系结构组件房间ViewModel CompleteableFormAction
- 无法找到填充字段 – 使用Kotlin与房间数据库
- 如何在Android应用程序中调试“SQL(查询)错误或缺少数据库”?
- Android Studio 3 Canary中未解决的参考
- 为什么有一个类存在的NoClassDefFoundError?
- Android选择和取消选择适配器kotlin中的项目的问题?
- 在浓缩咖啡测试超时,测试不运行