[SOLVED] Android "visibility" doesn't change if next instruction take long time

Issue I have following situation in my fragment. @SuppressLint("ClickableViewAccessibility") override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { val view = inflater.inflate(R.layout.streaming_fragment, container, false) val button = view.findViewById<Button>(R.id.radio_button) val pb = view.findViewById<ProgressBar>(R.id.progressBar) button.setOnClickListener { if (mediaPlayer.isPlaying) {

Continue reading