0

how to write this JAVA code

FloatingActionButton floatingButton;

in kotlin i have do something like

private var floatingButton:FloatingActionButton?= null

but gettting Smart Cast error.

Nomi
  • 1,981
  • 2
  • 8
  • 10
  • 1
    Does any of these Q&A answer your question? [(one)](https://stackoverflow.com/questions/34498562/in-kotlin-what-is-the-idiomatic-way-to-deal-with-nullable-values-referencing-o), [(two)](https://stackoverflow.com/questions/44595529/smart-cast-to-type-is-impossible-because-variable-is-a-mutable-property-tha), [(three)](https://stackoverflow.com/questions/39246249/best-way-to-handle-such-scenario-where-smart-cast-is-imposible) – hotkey Nov 09 '17 at 11:14
  • second helped me. – Nouman Ch Nov 09 '17 at 12:11

0 Answers0