summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andrew Solovay <asolovay@google.com> 2014-06-04 17:35:45 +0000
committer Android Git Automerger <android-git-automerger@android.com> 2014-06-04 17:35:45 +0000
commit15ceb87a07d9ad1fba4265112492e34c5cc360f5 (patch)
tree4991447647f6d84a701f3362cc717e29e6ab7906
parent693a954626866e40b01264ff57fe6c336a7504a8 (diff)
parent2e10cc9021b1cd3d90c55038191872f29a02c3f2 (diff)
am 2e10cc90: Merge "docs: Fixed error in code sample." into klp-docs
* commit '2e10cc9021b1cd3d90c55038191872f29a02c3f2': docs: Fixed error in code sample.
-rw-r--r--docs/html/training/contacts-provider/retrieve-names.jd12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/html/training/contacts-provider/retrieve-names.jd b/docs/html/training/contacts-provider/retrieve-names.jd
index b034a6a26d40..7106889a42c7 100644
--- a/docs/html/training/contacts-provider/retrieve-names.jd
+++ b/docs/html/training/contacts-provider/retrieve-names.jd
@@ -102,9 +102,9 @@ trainingnavtop=true
<p>
To display the search results in a {@link android.widget.ListView}, you need a main layout file
that defines the entire UI including the {@link android.widget.ListView}, and an item layout
- file that defines one line of the {@link android.widget.ListView}. For example, you can define
- the main layout file <code>res/layout/contacts_list_view.xml</code> that contains the
- following XML:
+ file that defines one line of the {@link android.widget.ListView}. For example, you could create
+ the main layout file <code>res/layout/contacts_list_view.xml</code> with
+ the following XML:
</p>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?&gt;
@@ -250,7 +250,8 @@ public class ContactsFragment extends Fragment implements
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the fragment layout
- return inflater.inflate(R.layout.contacts_list_layout, container, false);
+ return inflater.inflate(R.layout.contact_list_fragment,
+ container, false);
}
</pre>
<h3 id="DefineAdapter">Set up the CursorAdapter for the ListView</h3>
@@ -268,7 +269,8 @@ public class ContactsFragment extends Fragment implements
super.onActivityCreated(savedInstanceState);
...
// Gets the ListView from the View list of the parent activity
- mContactsList = (ListView) getActivity().findViewById(R.layout.contact_list_view);
+ mContactsList =
+ (ListView) getActivity().findViewById(R.layout.contact_list_view);
// Gets a CursorAdapter
mCursorAdapter = new SimpleCursorAdapter(
getActivity(),