An image-like control that has different display options for representing images, initials, and icons.
The Avatar
control allows the usage of different content, shapes, and sizes depending on the use case.
The content types that can be displayed are either images, icons, or initials. The shape can be circular or square. There are several predefined sizes, as well as an option to set a custom size.
Up to two Latin letters can be displayed as initials in an Avatar
. If there are more than two letters, or if there's a non-Latin character present, a default image placeholder will be created.
Constructor for a new Avatar
.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
This class does not have its own settings, but all settings applicable to the base type sap.m.Avatar can be used.
new sap.f.Avatar(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | Initial settings for the new control |
Method | Description |
---|---|
sap.f.Avatar.extend |
Creates a new subclass of class sap.f.Avatar with name
|
sap.f.Avatar.getMetadata |
Returns a metadata object for class sap.f.Avatar. |
Creates a new subclass of class sap.f.Avatar with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.m.Avatar.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |