IT. Expert System.

Android Reference

ClipDescription


android.content

Class ClipDescription

  • All Implemented Interfaces:
    Parcelable


    public class ClipDescription
    extends Object
    implements Parcelable
    Meta-data describing the contents of a ClipData. Provides enough information to know if you can handle the ClipData, but not the data itself.

    Developer Guides

    For more information about using the clipboard framework, read the Copy and Paste developer guide.

    • Field Detail

      • MIMETYPE_TEXT_PLAIN

        public static final String MIMETYPE_TEXT_PLAIN
        The MIME type for a clip holding plain text.
        See Also:
        Constant Field Values
      • MIMETYPE_TEXT_HTML

        public static final String MIMETYPE_TEXT_HTML
        The MIME type for a clip holding HTML text.
        See Also:
        Constant Field Values
      • MIMETYPE_TEXT_URILIST

        public static final String MIMETYPE_TEXT_URILIST
        The MIME type for a clip holding one or more URIs. This should be used for URIs that are meaningful to a user (such as an http: URI). It should not be used for a content: URI that references some other piece of data; in that case the MIME type should be the type of the referenced data.
        See Also:
        Constant Field Values
      • MIMETYPE_TEXT_INTENT

        public static final String MIMETYPE_TEXT_INTENT
        The MIME type for a clip holding an Intent.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ClipDescription

        public ClipDescription(CharSequence label,
                       String[] mimeTypes)
        Create a new clip.
        Parameters:
        label - Label to show to the user describing this clip.
        mimeTypes - An array of MIME types this data is available as.
      • ClipDescription

        public ClipDescription(ClipDescription o)
        Create a copy of a ClipDescription.
    • Method Detail

      • compareMimeTypes

        public static boolean compareMimeTypes(String concreteType,
                               String desiredType)
        Helper to compare two MIME types, where one may be a pattern.
        Parameters:
        concreteType - A fully-specified MIME type.
        desiredType - A desired MIME type that may be a pattern such as *\/*.
        Returns:
        Returns true if the two MIME types match.
      • getLabel

        public CharSequence getLabel()
        Return the label for this clip.
      • hasMimeType

        public boolean hasMimeType(String mimeType)
        Check whether the clip description contains the given MIME type.
        Parameters:
        mimeType - The desired MIME type. May be a pattern.
        Returns:
        Returns true if one of the MIME types in the clip description matches the desired MIME type, else false.
      • filterMimeTypes

        public String[] filterMimeTypes(String mimeType)
        Filter the clip description MIME types by the given MIME type. Returns all MIME types in the clip that match the given MIME type.
        Parameters:
        mimeType - The desired MIME type. May be a pattern.
        Returns:
        Returns an array of all matching MIME types. If there are no matching MIME types, null is returned.
      • getMimeTypeCount

        public int getMimeTypeCount()
        Return the number of MIME types the clip is available in.
      • getMimeType

        public String getMimeType(int index)
        Return one of the possible clip MIME types.
      • validate

        public void validate()
      • toString

        public String toString()
        Description copied from class: Object
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.
      • describeContents

        public int describeContents()
        Description copied from interface: Parcelable
        Describe the kinds of special objects contained in this Parcelable's marshalled representation.
        Specified by:
        describeContents in interface Parcelable
        Returns:
        a bitmask indicating the set of special object types marshalled by the Parcelable.


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: 1543 / 96487342. Delta: 0.02525 с