July 2018
Intermediate to advanced
242 pages
8h 6m
English
In order to implement this recipe's code, you need to create a new Android application project using Android Studio IDE.
Let's assume we have the following class, which is a sort of a controller of the application view layer:
class RegistrationScreen : Activity() { private val submitButton: Button by lazy { findViewById(R.id.submit_button) } override fun onCreate(savedInstanceState: Bundle?) {
// hook function called once the screen is displayed }}
It contains a reference to the submitButton: Button instance. Inside the onCreate() function we are going to implement logic responsible for handling the button clicks. Once the button is clicked, we want to make it invisible.
In order to invoke some action when the button is ...
Read now
Unlock full access