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: "It then converts the string we want to write to byte form and passes it into the output stream's write()
method."
A block of code is set as follows:
Set<String> values = new HashSet<String>(); values.add("Hello"); values.add("World"); Editor e = sp.edit(); e.putStringSet("strSetKey", values); e.commit(); Set<String> ret = sp.getStringSet(values, new HashSet<String>()); for(String r : ret) { Log.i("SharedPreferencesExample", "Retrieved vals: " + r); }
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
<uses-sdk android:minSdkVersion="5" /> <uses-permission android:name="android.permission.READ_CONTACTS"/> <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
Any command-line input or output is written as follows:
adb –s emulator-xxxx shell
New terms and important words are shown in bold.
3.133.124.53