Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “We created a class named PetsRepositoryImpl
that implements the PetsRepository
interface.”
A block of code is set as follows:
class PetsViewModel: ViewModel() { private val petsRepository: PetsRepository = PetsRepositoryImpl() fun getPets() = petsRepository.getPets() }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
[default] exten => s,1,Dial(Zap/1|30) exten => s,2,Voicemail(u100) exten => s,102,Voicemail(b100) exten => i,1,Voicemail(s0)
Any command-line input or output is written as follows:
FATAL EXCEPTION: main Process: com.packt.chapterten, PID: 7168 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.packt.chapterten/com.packt.chapterten.MainActivity}: java.lang.RuntimeException: This is a crash at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “Tap on the New Project button, which will take us to the Templates screen.”
Tips or important notes
Appear like this.