我是 kotlin for android 的新手。我想访问在扩展函数中具有相同名称的类成员。例如:
var visibility = null //class level variable
//EXTENSION FUNCTION
fun ProgressBar.changeVisibleState(flag: Boolean) {
if (flag)
visibility = View.VISIBLE
else
visibility = View.INVISIBLE
}
我如何访问方法visibility
。changeVisibleState