public static final class Settings.Bookmarks extends Object implements BaseColumns
Modifier and Type | Field and Description |
---|---|
static Uri |
CONTENT_URI
The content:// style URL for this table
|
static String |
FOLDER
Arbitrary string (displayed to the user) that allows bookmarks to be
organized into categories.
|
static String |
ID
The row ID.
|
static String |
INTENT
The Intent URL of the bookmark, describing what it points to.
|
static String |
ORDERING
The order in which the bookmark should be displayed
Type: INTEGER
|
static String |
SHORTCUT
Optional shortcut character associated with this bookmark.
|
static String |
TITLE
Descriptive name of the bookmark that can be displayed to the user.
|
_COUNT, _ID
Constructor and Description |
---|
Bookmarks() |
Modifier and Type | Method and Description |
---|---|
static Uri |
add(ContentResolver cr,
Intent intent,
String title,
String folder,
char shortcut,
int ordering)
Add a new bookmark to the system.
|
static Intent |
getIntentForShortcut(ContentResolver cr,
char shortcut)
Convenience function to retrieve the bookmarked Intent for a
particular shortcut key.
|
static CharSequence |
getLabelForFolder(Resources r,
String folder)
Return the folder name as it should be displayed to the user.
|
static CharSequence |
getTitle(Context context,
Cursor cursor)
Return the title as it should be displayed to the user.
|
public static final Uri CONTENT_URI
public static final String ID
Type: INTEGER
public static final String TITLE
getTitle(Context, Cursor)
any time you want to display the
title of a bookmark.)
Type: TEXT
public static final String FOLDER
getLabelForFolder(android.content.res.Resources, java.lang.String)
) but
the folder name does not change so you can consistently query for
the folder regardless of the current locale.
Type: TEXT
public static final String INTENT
Intent.getIntent(java.lang.String)
to create
an Intent that can be launched.
Type: TEXT
public static final String SHORTCUT
Type: INTEGER
public static final String ORDERING
Type: INTEGER
public static Intent getIntentForShortcut(ContentResolver cr, char shortcut)
cr
- The ContentResolver to query.shortcut
- The shortcut key.public static Uri add(ContentResolver cr, Intent intent, String title, String folder, char shortcut, int ordering)
cr
- The ContentResolver to query.intent
- The desired target of the bookmark.title
- Bookmark title that is shown to the user; null if none
or it should be resolved to the intent's title.folder
- Folder in which to place the bookmark; null if none.shortcut
- Shortcut that will invoke the bookmark; 0 if none. If
this is non-zero and there is an existing bookmark entry
with this same shortcut, then that existing shortcut is
cleared (the bookmark is not removed).public static CharSequence getLabelForFolder(Resources r, String folder)
r
- Resources object for current locale; only need access to
system resources.folder
- The value found in the FOLDER
column.public static CharSequence getTitle(Context context, Cursor cursor)