Unable to call input function
# android
s
Unable to call input function
🧵 4
e
Your input function declared, has mandatory parameter -> View, so you should provide View or change function signature.
s
If I change function signature the view as button doesn't work
g
Could you please be more specific, your questions do not provide enough information to answer them or even understand your problem
s
@gildor I want to call this function INPUT but can't as it's view type
e
@Shagun Chahar not sure what you are trying to explain, but clearly there is a problem with your code. As from what I can observe, your input method signature should look like
fun input()
If there are other places where this method can be called and view as parameter will actually be provided - thus is optional and therefore can be null, method signature should look like
fun input(view: View?)
or even
fun input(view: View? = null)