|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.content.pm.PackageItemInfo
public class PackageItemInfo
Base class containing information common to all package items held by the package manager. This provides a very common basic set of attributes: a label, icon, and meta-data. This class is not intended to be used by itself; it is simply here to share common definitions between all items returned by the package manager. As such, it does not itself implement Parcelable, but does provide convenience methods to assist in the implementation of Parcelable in subclasses.
| Nested Class Summary | |
|---|---|
static class |
PackageItemInfo.DisplayNameComparator
|
| Field Summary | |
|---|---|
int |
icon
A drawable resource identifier (in the package's resources) of this component's icon. |
int |
labelRes
A string resource identifier (in the package's resources) of this component's label. |
Bundle |
metaData
Additional meta-data associated with this component. |
String |
name
Public name of this item. |
CharSequence |
nonLocalizedLabel
The string provided in the AndroidManifest file, if any. |
String |
packageName
Name of the package that this item is in. |
| Constructor Summary | |
|---|---|
|
PackageItemInfo()
|
|
PackageItemInfo(PackageItemInfo orig)
|
protected |
PackageItemInfo(Parcel source)
|
| Method Summary | |
|---|---|
protected void |
dumpBack(Printer pw,
String prefix)
|
protected void |
dumpFront(Printer pw,
String prefix)
|
Drawable |
loadIcon(PackageManager pm)
Retrieve the current graphical icon associated with this item. |
CharSequence |
loadLabel(PackageManager pm)
Retrieve the current textual label associated with this item. |
XmlResourceParser |
loadXmlMetaData(PackageManager pm,
String name)
Load an XML resource attached to the meta-data of this item. |
void |
writeToParcel(Parcel dest,
int parcelableFlags)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public String name
public String packageName
public int labelRes
public CharSequence nonLocalizedLabel
PackageManager.getApplicationLabel(android.content.pm.ApplicationInfo)
public int icon
public Bundle metaData
PackageManager.GET_META_DATA flag when requesting the info.
| Constructor Detail |
|---|
public PackageItemInfo()
public PackageItemInfo(PackageItemInfo orig)
protected PackageItemInfo(Parcel source)
| Method Detail |
|---|
public CharSequence loadLabel(PackageManager pm)
pm - A PackageManager from which the label can be loaded; usually
the PackageManager from which you originally retrieved this item.
public Drawable loadIcon(PackageManager pm)
pm - A PackageManager from which the icon can be loaded; usually
the PackageManager from which you originally retrieved this item.
public XmlResourceParser loadXmlMetaData(PackageManager pm,
String name)
pm - A PackageManager from which the XML can be loaded; usually
the PackageManager from which you originally retrieved this item.name - Name of the meta-date you would like to load.
protected void dumpFront(Printer pw,
String prefix)
protected void dumpBack(Printer pw,
String prefix)
public void writeToParcel(Parcel dest,
int parcelableFlags)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||