直接上代码:
val bottomSheet = v.findViewById<View>(R.id.ll_bg) as LinearLayout
bottomSheet!!.setBackgroundColor(Color.TRANSPARENT)
val originLayoutParams = v.layoutParams
originLayoutParams.height = (this@ChatRoomActivity.getRealPoint().y * 0.84).toInt() - StatusBarUtil.getNavigationBarHeight(this@ChatRoomActivity)
bottomSheet.layoutParams = originLayoutParams
网友评论