August 2017
Intermediate to advanced
440 pages
10h
English
When we have a member extension function, then it becomes more complicated to administer the elements we are calling. Inside a member extension, we have implicit access to the following:
So inside the setUp extension function, we can use both member and receiver methods and properties:
class MainActivity: Activity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.main_activity) val buttonView = findViewById(R.id.button_view) as Button buttonView.setUp() } private ...Read now
Unlock full access