开发者

how can i set that before created view

开发者 https://www.devze.com 2022-12-07 20:05 出处:网络
i writed that button i think that code worked after view created i need work that before created view with onMesure how can i do that ?

i writed that button i think that code worked after view created i need work that before created view with onMesure how can i do that ?

  override fun onBindViewHolder(
    holder: VHolder<ItemMultimediaBinding, MediaResponse.Data>,
    position: Int
) {
        holder.binding?.apply {
        getItem(position)?.let { item ->

            imgMultimedia.loadCompat(开发者_运维技巧item.imageUrl!!)
            cvMultiMedia.setHeight(getScreenHeight()/3) //hown can i do that with onMesure

            imgMultimedia.setOnClickListener(){
                val action = MultiMediaFragmentDirections.actionMultiMediaFragmentToMediaPlayerFragment("title",item)
                imgMultimedia.findNavController().navigate(action)
            }

        }
    }
0

精彩评论

暂无评论...
验证码 换一张
取 消