25.6 Using Apply Code Changes
Begin by clicking on the run button and selecting a suitable emulator or physical device as the run target. After clicking the run button, track the amount of time before the example app appears on the device or emulator.
Once running, click on the action button (the button displaying an envelope icon located in the lower right-hand corner of the screen). Note that a Snackbar instance appears displaying text which reads “Replace with your own action” as shown in Figure 25-6:
Figure 25-6
Once the app is running, the Apply Changes buttons should have been enabled indicating that certain project changes can be applied without having to reinstall and restart the app. To see this in action, edit the MainActivity.java file, locate the onCreate method and modify the action code so that a different message is displayed when the action button is selected:
FloatingActionButton fab = findViewById(R.id.fab);
fab.setOnClickListener...