Lines Matching refs:link
53 This lesson shows you how to add a {@link android.widget.QuickContactBadge} to your UI
54 and how to bind data to it. A {@link android.widget.QuickContactBadge} is a widget that
55 initially appears as a thumbnail image. Although you can use any {@link android.graphics.Bitmap}
56 for the thumbnail image, you usually use a {@link android.graphics.Bitmap} decoded from the
61 {@link android.widget.QuickContactBadge} expands into a dialog containing the following:
81 The {@link android.widget.QuickContactBadge} view provides instant access to a contact's
84 can click on the {@link android.widget.QuickContactBadge}, choose the communication method they
89 To add a {@link android.widget.QuickContactBadge}, insert a
107 To display a contact in the {@link android.widget.QuickContactBadge}, you need a content URI
108 for the contact and a {@link android.graphics.Bitmap} for the small image. You generate
109 both the content URI and the {@link android.graphics.Bitmap} from columns retrieved from the
111 your {@link android.database.Cursor}.
116 <li>{@link android.provider.ContactsContract.Contacts#_ID Contacts._ID}</li>
117 <li>{@link android.provider.ContactsContract.Contacts#LOOKUP_KEY Contacts.LOOKUP_KEY}</li>
119 {@link android.provider.ContactsContract.Contacts#PHOTO_THUMBNAIL_URI
127 <li>{@link android.provider.ContactsContract.Contacts#_ID Contacts._ID}</li>
128 <li>{@link android.provider.ContactsContract.Contacts#LOOKUP_KEY Contacts.LOOKUP_KEY}</li>
132 {@link android.database.Cursor} that contains these columns as well as others you may have
133 chosen. To learn how to retrieve this columns in a {@link android.database.Cursor}, read the
139 {@link android.widget.QuickContactBadge}.
144 {@link android.provider.ContactsContract.Contacts#getLookupUri getLookupUri(id,lookupKey)} to
145 get a {@link android.provider.ContactsContract.Contacts#CONTENT_LOOKUP_URI}, then
146 call {@link android.widget.QuickContactBadge#assignContactUri assignContactUri()} to set the
178 When users click the {@link android.widget.QuickContactBadge} icon, the contact's
183 Setting the contact URI for the {@link android.widget.QuickContactBadge} does not automatically
185 contact's {@link android.database.Cursor} row, use it to open the file containing the compressed
186 thumbnail photo, and read the file into a {@link android.graphics.Bitmap}.
190 {@link android.provider.ContactsContract.Contacts#PHOTO_THUMBNAIL_URI} column isn't available
192 from the {@link android.provider.ContactsContract.Contacts.Photo Contacts.Photo} subtable.
195 First, set up variables for accessing the {@link android.database.Cursor} containing the
196 {@link android.provider.ContactsContract.Contacts#_ID Contacts._ID} and
197 {@link android.provider.ContactsContract.Contacts#LOOKUP_KEY Contacts.LOOKUP_KEY} columns, as
230 {@link android.graphics.Bitmap}. Start by constructing a URI that points to the
310 thumbnail {@link android.graphics.Bitmap}, and use the result to set the photo thumbnail in
311 your {@link android.widget.QuickContactBadge}:
328 A {@link android.widget.QuickContactBadge} is a useful addition to a
329 {@link android.widget.ListView} that displays a list of contacts. Use the
330 {@link android.widget.QuickContactBadge} to display a thumbnail photo for each contact; when
331 users click the thumbnail, the {@link android.widget.QuickContactBadge} dialog appears.
335 To start, add a {@link android.widget.QuickContactBadge} view element to your item layout
336 For example, if you want to display a {@link android.widget.QuickContactBadge} and a name for
362 To bind a {@link android.support.v4.widget.CursorAdapter} to a {@link android.widget.ListView}
363 containing a {@link android.widget.QuickContactBadge}, define a custom adapter that
364 extends {@link android.support.v4.widget.CursorAdapter}. This approach allows you to process the
365 data in the {@link android.database.Cursor} before you bind it to the
366 {@link android.widget.QuickContactBadge}. This approach also allows you to bind multiple
367 {@link android.database.Cursor} columns to the {@link android.widget.QuickContactBadge}. Neither
368 of these operations is possible in a regular {@link android.support.v4.widget.CursorAdapter}.
371 The subclass of {@link android.support.v4.widget.CursorAdapter} that you define must
375 <dt>{@link android.support.v4.widget.CursorAdapter#newView CursorAdapter.newView()}</dt>
377 Inflates a new {@link android.view.View} object to hold the item layout. In the override
378 of this method, store handles to the child {@link android.view.View} objects of the layout,
379 including the child {@link android.widget.QuickContactBadge}. By taking this approach, you
380 avoid having to get handles to the child {@link android.view.View} objects each time you
384 {@link android.view.View} objects. This technique allows you to control their binding in
385 {@link android.support.v4.widget.CursorAdapter#bindView CursorAdapter.bindView()}.
388 <dt>{@link android.support.v4.widget.CursorAdapter#bindView CursorAdapter.bindView()}</dt>
390 Moves data from the current {@link android.database.Cursor} row to the child
391 {@link android.view.View} objects of the item layout. You must override this method so
393 {@link android.widget.QuickContactBadge}. The default implementation only allows a 1-to-1
394 mapping between a column and a {@link android.view.View}
399 {@link android.support.v4.widget.CursorAdapter}:
403 Define the subclass of {@link android.support.v4.widget.CursorAdapter} including its
405 {@link android.support.v4.widget.CursorAdapter#newView newView()} and
406 {@link android.support.v4.widget.CursorAdapter#bindView bindView()}:
501 In your code, set up variables, including a {@link android.database.Cursor} projection that
571 In {@link android.support.v4.app.Fragment#onCreate Fragment.onCreate()}, instantiate the custom
572 cursor adapter and get a handle to the {@link android.widget.ListView}:
594 In {@link android.support.v4.app.Fragment#onActivityCreated onActivityCreated()}, bind the
595 <code>ContactsAdapter</code> to the {@link android.widget.ListView}:
608 When you get back a {@link android.database.Cursor} containing the contacts data, usually in
609 {@link android.support.v4.app.LoaderManager.LoaderCallbacks#onLoadFinished onLoadFinished()},
610 call {@link android.support.v4.widget.CursorAdapter#swapCursor swapCursor()} to move the
611 {@link android.database.Cursor} data to the {@link android.widget.ListView}. This displays the
612 {@link android.widget.QuickContactBadge} for each entry in the list of contacts:
621 When you bind a {@link android.database.Cursor} to a
622 {@link android.widget.ListView} with a {@link android.support.v4.widget.CursorAdapter}
623 (or subclass), and you use a {@link android.support.v4.content.CursorLoader} to load the
624 {@link android.database.Cursor}, always clear references to the {@link android.database.Cursor}
626 {@link android.support.v4.app.LoaderManager.LoaderCallbacks#onLoaderReset onLoaderReset()}.