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)
}
}
}
精彩评论