56.4 A Threading Example
The remainder of this chapter will work through some simple examples intended to provide a basic introduction to threads. The first step will be to highlight the importance of performing time-consuming tasks in a separate thread from the main thread.
Launch Android Studio, select the Create New Project quick start option from the Android Studio welcome screen and, within the resulting new project dialog, choose the Empty Activity template before clicking on the Next button.
Enter ThreadExample into the Name field and specify com.ebookfrenzy.threadexample as the package name. Before clicking on the Finish button, change the Minimum API level setting to API 26: Android 8.0 (Oreo) and the Language menu to Java. Convert the project to use view binding by following the steps in section 11.8 Migrating a Project to View Binding.