Raed Ghazal
03/15/2022, 6:14 PM@ColorRes, @ColorInt
fun Int.doSomthing(): Int {
return getColor(this)
}
so the extension function is for @ColorRes Int, and the return type is @ColorInt
if I annotate the function with @ColorRes it will take it as a return type annotation but I can’t seem to find how to annotate the main class the extension is made ofmkrussel
03/15/2022, 6:21 PMmkrussel
03/15/2022, 6:23 PMRaed Ghazal
03/15/2022, 6:24 PMRaed Ghazal
03/15/2022, 6:24 PMnapperley
03/16/2022, 9:28 PM