Struct android_manifest::Category
source · [−]Expand description
Adds a category name to an intent filter.
See Intents and Intent Filters
for details on intent filters and
the role of category specifications within a filter.
XML Syntax
<category android:name="string" />
Contained in:
Introduced in
API Level 1
Fields
name: Option<String>
The name of the category. Standard categories are defined in the Intent
class as CATEGORY_name constants. The name assigned here can be derived
from those constants by prefixing "android.intent.category."
to
the name that follows CATEGORY_. For example, the string value for
CATEGORY_LAUNCHER is"android.intent.category.LAUNCHER"
.
Note
In order to receive implicit intents, you must include the
CATEGORY_DEFAULT
category in the intent filter. The methods
startActivity()
and startActivityForResult()
treat all intents
as if they declared the CATEGORY_DEFAULT
category. If you do not
declare it in your intent filter, no implicit intents will resolve to
your activity.
Custom categories should use the package name as a prefix, to ensure that they are unique.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Category
impl<'de> Deserialize<'de> for Category
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl YaDeserialize for Category
impl YaDeserialize for Category
fn deserialize<R: Read>(reader: &mut Deserializer<R>) -> Result<Self, String>
sourceimpl YaSerialize for Category
impl YaSerialize for Category
fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>
fn serialize_attributes(
&self,
source_attributes: Vec<OwnedAttribute>,
source_namespace: Namespace
) -> Result<(Vec<OwnedAttribute>, Namespace), String>
impl StructuralPartialEq for Category
Auto Trait Implementations
impl RefUnwindSafe for Category
impl Send for Category
impl Sync for Category
impl Unpin for Category
impl UnwindSafe for Category
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more