Stay organized with collections
Save and categorize content based on your preferences.
MimeTypeInfo
class MimeTypeInfo
Detailed description of a specific MIME type, including an icon and label that describe the type.
Summary
Public methods |
CharSequence |
Return a content description for this MIME type.
|
Icon |
Return a visual representation of this MIME type.
|
CharSequence |
Return a textual representation of this MIME type.
|
Public methods
getContentDescription
fun getContentDescription(): CharSequence
Return a content description for this MIME type.
getIcon
fun getIcon(): Icon
Return a visual representation of this MIME type. This can be styled using Icon.setTint(int)
to match surrounding UI.
Return |
Icon |
This value cannot be null . |
getLabel
fun getLabel(): CharSequence
Return a textual representation of this MIME type.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ContentResolver.MimeTypeInfo\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nMimeTypeInfo\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/content/ContentResolver.MimeTypeInfo \"View this page in Java\") \n\n```\nclass MimeTypeInfo\n```\n\n|---|---------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.content.ContentResolver.MimeTypeInfo](#) |\n\nDetailed description of a specific MIME type, including an icon and label that describe the type.\n\nSummary\n-------\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | [getContentDescription](#getContentDescription())`()` Return a content description for this MIME type. |\n| [Icon](../graphics/drawable/Icon.html#) | [getIcon](#getIcon())`()` Return a visual representation of this MIME type. |\n| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | [getLabel](#getLabel())`()` Return a textual representation of this MIME type. |\n\nPublic methods\n--------------\n\n### getContentDescription\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getContentDescription(): CharSequence\n```\n\nReturn a content description for this MIME type.\n\n| Return ||\n|-----------------------------------------------------------------------------------------------|------------------------------|\n| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | This value cannot be `null`. |\n\n**See Also**\n\n- [android.view.View#setContentDescription(CharSequence)](../view/View.html#setContentDescription(kotlin.CharSequence)) \n\n### getIcon\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getIcon(): Icon\n```\n\nReturn a visual representation of this MIME type. This can be styled using [Icon.setTint(int)](../graphics/drawable/Icon.html#setTint(kotlin.Int)) to match surrounding UI.\n\n| Return ||\n|-----------------------------------------|------------------------------|\n| [Icon](../graphics/drawable/Icon.html#) | This value cannot be `null`. |\n\n**See Also**\n\n- [android.graphics.drawable.Icon#loadDrawable(Context)](../graphics/drawable/Icon.html#loadDrawable(android.content.Context))\n- [android.widget.ImageView#setImageDrawable(Drawable)](../widget/ImageView.html#setImageDrawable(android.graphics.drawable.Drawable)) \n\n### getLabel\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getLabel(): CharSequence\n```\n\nReturn a textual representation of this MIME type.\n\n| Return ||\n|-----------------------------------------------------------------------------------------------|------------------------------|\n| [CharSequence](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-sequence/index.html) | This value cannot be `null`. |\n\n**See Also**\n\n- [android.widget.TextView#setText(CharSequence)](../widget/TextView.html#setText(kotlin.CharSequence))"]]