IT. Expert System.

Android Reference

PackageItemInfo


android.content.pm

Class PackageItemInfo

  • Direct Known Subclasses:
    ApplicationInfo, ComponentInfo, InstrumentationInfo, PermissionGroupInfo, PermissionInfo


    public class PackageItemInfo
    extends Object
    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.
    • Field Detail

      • name

        public String name
        Public name of this item. From the "android:name" attribute.
      • packageName

        public String packageName
        Name of the package that this item is in.
      • labelRes

        public int labelRes
        A string resource identifier (in the package's resources) of this component's label. From the "label" attribute or, if not set, 0.
      • icon

        public int icon
        A drawable resource identifier (in the package's resources) of this component's icon. From the "icon" attribute or, if not set, 0.
      • logo

        public int logo
        A drawable resource identifier (in the package's resources) of this component's logo. Logos may be larger/wider than icons and are displayed by certain UI elements in place of a name or name/icon combination. From the "logo" attribute or, if not set, 0.
      • metaData

        public Bundle metaData
        Additional meta-data associated with this component. This field will only be filled in if you set the PackageManager.GET_META_DATA flag when requesting the info.
    • Constructor Detail

      • PackageItemInfo

        public PackageItemInfo()
      • PackageItemInfo

        protected PackageItemInfo(Parcel source)
    • Method Detail

      • loadLabel

        public CharSequence loadLabel(PackageManager pm)
        Retrieve the current textual label associated with this item. This will call back on the given PackageManager to load the label from the application.
        Parameters:
        pm - A PackageManager from which the label can be loaded; usually the PackageManager from which you originally retrieved this item.
        Returns:
        Returns a CharSequence containing the item's label. If the item does not have a label, its name is returned.
      • loadIcon

        public Drawable loadIcon(PackageManager pm)
        Retrieve the current graphical icon associated with this item. This will call back on the given PackageManager to load the icon from the application.
        Parameters:
        pm - A PackageManager from which the icon can be loaded; usually the PackageManager from which you originally retrieved this item.
        Returns:
        Returns a Drawable containing the item's icon. If the item does not have an icon, the item's default icon is returned such as the default activity icon.
      • loadDefaultIcon

        protected Drawable loadDefaultIcon(PackageManager pm)
        Retrieve the default graphical icon associated with this item.
        Parameters:
        pm - A PackageManager from which the icon can be loaded; usually the PackageManager from which you originally retrieved this item.
        Returns:
        Returns a Drawable containing the item's default icon such as the default activity icon.
      • loadLogo

        public Drawable loadLogo(PackageManager pm)
        Retrieve the current graphical logo associated with this item. This will call back on the given PackageManager to load the logo from the application.
        Parameters:
        pm - A PackageManager from which the logo can be loaded; usually the PackageManager from which you originally retrieved this item.
        Returns:
        Returns a Drawable containing the item's logo. If the item does not have a logo, this method will return null.
      • loadDefaultLogo

        protected Drawable loadDefaultLogo(PackageManager pm)
        Retrieve the default graphical logo associated with this item.
        Parameters:
        pm - A PackageManager from which the logo can be loaded; usually the PackageManager from which you originally retrieved this item.
        Returns:
        Returns a Drawable containing the item's default logo or null if no default logo is available.
      • loadXmlMetaData

        public XmlResourceParser loadXmlMetaData(PackageManager pm,
                                        String name)
        Load an XML resource attached to the meta-data of this item. This will retrieved the name meta-data entry, and if defined call back on the given PackageManager to load its XML file from the application.
        Parameters:
        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.
        Returns:
        Returns an XmlPullParser you can use to parse the XML file assigned as the given meta-data. If the meta-data name is not defined or the XML resource could not be found, null is returned.
      • writeToParcel

        public void writeToParcel(Parcel dest,
                         int parcelableFlags)
      • getApplicationInfo

        protected ApplicationInfo getApplicationInfo()
        Get the ApplicationInfo for the application to which this item belongs, if available, otherwise returns null.
        Returns:
        Returns the ApplicationInfo of this item, or null if not known.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1177 / . Delta: 0.02252 с