Issue
I want to decrease the use of binding in my code
fun setVisibility() {
binding.tvFact.visibility = View.VISIBLE
binding.tvTimeStamp.visibility = View.VISIBLE
binding.progressBar.visibility = View.GONE
}
Solution
If you do not like the syntax try this:
binding.apply{
tvFact.visibility = View.VISIBLE
tvTimeStamp.visibility = View.VISIBLE
progressBar.visibility = View.GONE
}
Answered By - talhatek
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.