public class

Attachment

extends Object
implements Parcelable
java.lang.Object
   ↳ com.sap.cloud.mobile.fiori.attachment.Attachment

Class Overview

A class which shows Attachment.

Structure

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<Attachment> CREATOR
Public Constructors
Attachment(Uri uri)
Attachment(Uri uri, String mimeType)
Attachment(Uri uri, Uri thumbnail)
Attachment(Uri uri, Uri thumbnail, String mimeType)
Attachment(Uri uri, int thumbnailRes)
Protected Constructors
Attachment(Parcel in)
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
CharSequence getDetail()
Get the detail of the Attachment
CharSequence getDisplayName()
Get the display name of the attached file.
String getMimeType()
Get the media type of the attached file.
Uri getUri()
Get the Uri of the attached file.
void setDetail(CharSequence detail)
Set the detail of the attachment
void setDisplayName(CharSequence displayName)
Set the display name of the attached file.
void setIcon(int res)
void setMimeType(String mimeType)
Set the media type of the attached file.
void setThumbnail(int res)
Set the resource id of the thumbnail of the attached file.
void setThumbnail(Uri thumbnail)
Set the URI of the thumbnail of the attached file.
void writeToParcel(Parcel dest, int flags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<Attachment> CREATOR

Public Constructors

public Attachment (Uri uri)

Parameters
uri Uri

public Attachment (Uri uri, String mimeType)

public Attachment (Uri uri, Uri thumbnail)

public Attachment (Uri uri, Uri thumbnail, String mimeType)

public Attachment (Uri uri, int thumbnailRes)

Protected Constructors

protected Attachment (Parcel in)

Public Methods

public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
  • a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

public CharSequence getDetail ()

Get the detail of the Attachment

Returns
  • CharSequence

public CharSequence getDisplayName ()

Get the display name of the attached file.

Returns
  • CharSequence
    @see #setDisplayName(CharSequence)}

public String getMimeType ()

Get the media type of the attached file.

Returns
  • String
    @see #setMimeType(String)}

public Uri getUri ()

Get the Uri of the attached file.

Returns
  • Uri

public void setDetail (CharSequence detail)

Set the detail of the attachment

Parameters
detail CharSequence

public void setDisplayName (CharSequence displayName)

Set the display name of the attached file.

Parameters
displayName CharSequence
@see #getDisplayName()}

public void setIcon (int res)

public void setMimeType (String mimeType)

Set the media type of the attached file.

Parameters
mimeType String
@see #getMimeType()}

public void setThumbnail (int res)

Set the resource id of the thumbnail of the attached file. In case thumbnail is missing, this resource is used to draw the thumbnail of the attached file.

Parameters
res int, a drawable res id
@see #setThumbnail(Uri)}

public void setThumbnail (Uri thumbnail)

Set the URI of the thumbnail of the attached file. This takes precedence over Thumbnail resource id.

Parameters
thumbnail Uri
@see #setThumbnail(int)}

public void writeToParcel (Parcel dest, int flags)

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.