动态修改布局

binding.llLyricRoot.updateLayoutParams{
                removeRule(RelativeLayout.ALIGN_PARENT_TOP)
                addRule(RelativeLayout.CENTER_HORIZONTAL)
            }


          binding.flSongLogo.updateLayoutParams {
                        width = LayoutParams.MATCH_PARENT
                    }
                    binding.llLyricRoot.updateLayoutParams {
                        topMargin = 0
                    }

你可能感兴趣的:(java,前端,javascript)