yoo
06/30/2016, 2:23 PMclass BaseActivity : AppCompatActivity() {
fun AppCompatActivity.shortToast(message: String) {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
}
}
Why can't I use shortToast inside fragment even with casting to special class like below?
(activity as BaseActivity).shortToast("A")
I know that it possible to create function in package scope and use it, but how to use function declared inside the class?