In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "Implement onCreateOptionsMenu
and onOptionsItemSelected
methods."
A block of code is set as follows:
<?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/settings" android:title="Settings"> </item> <item android:id="@+id/about" android:title="About"> </item> </menu>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
@Override
public void onPrepareSubMenu(SubMenu subMenu) {
//In order to add submenus, we should override this method we dynamically created submenus
subMenu.clear();
subMenu.add("SubItem1").setOnMenuItemClickListener(this);
subMenu.add("SubItem2").setOnMenuItemClickListener(this);
}
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on the Insert button and then click on the List button".
34.239.150.167