What is the meaning of view: View
in Kotlin for Android?
Asked
Active
Viewed 201 times
-4

Paolo Forgia
- 6,572
- 8
- 46
- 58

Karandeep Singh
- 1
- 1
-
[Please don't post your code as an image.](//meta.stackoverflow.com/q/285551) – Andrew Myers Jul 26 '17 at 22:10
-
1Is this a serious question? I'd start reading the documentation first – s1m0nw1 Jul 26 '17 at 22:17
1 Answers
1
What you're seeing is the parameters to pass into the function : view:View
. It says you pass in a parameter of type View
and when you use it in the function you reference it by it's name view
.
For example:
fun doubleNumber(num:Int) : Int{
return num * num
}
In this function doubleNumber
we pass in a parameter of type Int
and call it num
. You can see that within the function when we want to use that passed in parameter we use it's name num
.

ecain
- 1,282
- 5
- 23
- 54
-
thankyou , but i knew this .... SOMEBODY EDITED MY QUESTION .. actually i want to ask that how a view can be a datatype ? number , string is a datatype but a view ? means – Karandeep Singh Jul 27 '17 at 15:29
-