Why Is Setting OnClickListener Working Once?
I want to migrate a very solid project structure that I use to Kotlin. I first tried the basics: Activities and Fragment transactions. It appears so easy and simple: class MainActi
Solution 1:
You have to set your variables that are bound by ButterKnife as lateinit var
instead of val
. Try
@BindView(R.id.btn_sale)
lateinit var title: Button
@BindView(R.id.btn_visit)
lateinit var title: Button
Solution 2:
Answer : solved it by getting rid of KotterKnife
and ButterKnife
and use android's findViewById
. I guess one of the advantages of the language and the framework's progress make some libraries obsolete or unnecessary.
Post a Comment for "Why Is Setting OnClickListener Working Once?"