PartViews (Discontinued)
Note
Please note that we have announced end of sale for Android UI SDK. It is no longer offered as a standard Webex Connect capability.
com.imimobile.connect.ui.views.partviews
The classes in this packages are:
ICMessagePartContainerViewHolder
This class contains all the part views that represent the content of an ICMessageData instance.
bindMessage
This method binds message parts to the respective message part view holder.
  Syntax: void bindMessage(ICMessageData messageData, ICMessagePart[] messageParts)
  Parameters:
Parameters | Type | Description |
---|---|---|
messageData | ICMessageData | Content of ICMessageData |
messageParts | ICMessagePart[] | An array of message parts |
getRootViewGroup
This method is used to return partContainer viewGroup that can contain other part views.
  Syntax: ViewGroup getRootViewGroup()
  Return Value: Returns partContainer viewGroup
addPartView
This method is used to add partview from partView Holder to partContainer viewGroup.
  Syntax: void addPartView(ICMessagePartViewHolder partViewHolder)
  Parameters:
Parameter | Type | Description |
---|---|---|
partViewHolder -message partView holder |
setMessageViewStyle
This method sets style to message partContainer view holder and individual message partview holders
  Syntax: void setMessageViewStyle(ICMessageViewStyle style)
  Parameters:
Parameter | Type | Description |
---|---|---|
style | ICMessageViewStyle | Message view style |
ICMessagePartViewFactory
This abstract class represents all the methods needed to create the partviews displayed in either an inbox view or a conversation view.
createPartView
This method sets style to message partContainer view holder and individual message partview holders.
  Syntax: abstract ICMessagePartViewHolder createPartView(ViewGroup root)
  Parameters:
Parameters | Type | Description |
---|---|---|
root | ViewGroup | message part container view group |
  Return Value: Returns message part view holder.
getContentType
This method returns content-type for message partview factory.
  Syntax: String getContentType()
  Return Value: Returns content type for message part view factory.
ICMessagePartViewHolder
This is an abstract class that represents a message part. This class can represent a text or an attachment
ICMessagePartViewHolder
  Syntax: ICMessagePartViewHolder(View partView)
  Parameters:
Parameter | Type | Description |
---|---|---|
partView | View | message part view |
bindMessagePart
This method binds the message part to MessagePartViewHolder.
Syntax: boolean bindMessagePart(ICMessagePart part, ICMessageData message)
Parameters:
Parameter | Type | Description |
---|---|---|
part | ICMessagePart | message part |
message | ICMessageData | ICMessageData |
  Return Value: Returns 'true
binding message part is successful with MessagePartViewHolder, false
otherwise.
setMessageViewStyle
This method sets the message view style to message part view holder.
  Syntax: void setMessageViewStyle(ICMessageViewStyle style)
Parameters:
Parameter | Type | Description |
---|---|---|
style | ICMessageViewStyle | message view style |
getView
This method returns Message PartView holder.
  Syntax: View getView()
Returns Value: Returns view object for message PartView holder.
com.imimobile.connect.ui.views.partviews.location
ICLocationPartViewHolder
This class implements the ICMessagePartViewHolder
and will represent the Location part of the message.
ICLocationPartViewFactory
Factory class that creates ICLocationPartViewHolder instances.
com.imimobile.connect.ui.views.partviews.media
ICMediaPartViewHolder
This is an abstract class inherits from ICMessagePartViewHolder
and it represents media message part (attachment) of the message.
setClickable
This method is used to enable/disable media part view on Click functionality.
  Syntax: void setClickable(boolean clickable)
Parameters:
Parameter | Type | Description |
---|---|---|
clickable | boolean | boolean true to make the media part view clickable, false otherwise |
onPriorToSetFile
This method is called ahead of setFile(File)
while displaying upload/download progress/button.
  Syntax: void onPriorToSetFile()
setFile
This method is called post to download/upload/find
local file
  Syntax: void setFile(File file)
  Parameters:
Parameter | Type | Description |
---|---|---|
file | File | local file that is being uploaded |
com.imimobile.connect.ui.views.partviews.media.audio
ICAudioPartViewFactory
This class implements the ICMessagePartViewFactory and is responsible for the creation of the ICAudioPartView instances.
ICAudioPartViewHolder
This class implements the ICMediaPartViewHolder and will represent the Audio part of the message.
com.imimobile.connect.ui.views.partviews.media.file
ICFilePartViewFactory
This class implements the ICMessagePartViewFactory and is responsible for creating the ICFilePartView
ICFilePartViewHolder
This class implements the ICMediaPartViewHolder and will represent the file part of the message.
com.imimobile.connect.ui.views.partviews.media.image
ICImagePartViewFactory
This class implements the ICMessagePartViewFactory
and is responsible for create part of the ICImagePartView
ICImagePartViewHolder
This class implements the ICMediaPartViewHolder
and represents the Image part of the message.
com.imimobile.connect.ui.views.partviews. media.video
ICVideoPartViewFactory
This class implements the ICMessagePartViewFactory
and is responsible for create part of ICVideoPartView
.
ICVideoPartViewHolder
This class implements the ICMediaPartViewHolder
and represents the Video part of the message.
com.imimobile.connect.ui.views.partviews.text
ICTextPartViewFactory
Concrete implementation of ICMessagePartViewFactory
, responsible for creating ICTextPartViewHolder
instances.
ICTextPartViewHolder
This class implements the ICMessagePartViewHolder
and will represent the text message part of the message.
com.imimobile.connect.ui.views.partviews.url
ICURLPartViewFactory
Concrete implementation of ICMessagePartViewFactory
, responsible for creating ICURLPartViewHolder
instances.
ICURLPartViewHolder
This class implements the ICMessagePartViewHolder
and will represent the URL part of the message.
ICConversationMessageViewFactory
Factory class that inherits from ICMessageViewFactory
and creates ICConversationMessageViewHolder
instances. Used as the default message view factory within ICConversationRecyclerView
.
Refer ICMessageViewFactory
, for details of the base methods, that are overridden by this class.
com.imimobile.connect.ui.conversation
ICConversationMessageViewHolder
Constructor
This method used to create the ICConversationMessageViewHolder class instance.
ICConversationMessageViewHolder
Public Constructor |
---|
public ICConversationMessageViewHolder(android.view.View messageView) |
bindMessage
This method binds message parts to respective message part view holder
Syntax: public void bindMessage(com.imimobile.connect.core.messaging.ICMessageData messageData, com.imimobile.connect.ui.interfaces.ICMessagePart[] messageParts)
Overrides: bindMessage in class com.imimobile.connect.ui.ICMessageViewHolder
Parameters:
Parameter | Description |
---|---|
messageData | ICMessageData |
messageParts | an Array of message parts |
bindAvatar
This method used to bind Avatar to Conversation message view holder
Syntax: public void bindAvatar(boolean isOutgoingMessage, android.graphics.Bitmap avatar)
Specified by: bindAvatar in class com.imimobile.connect.ui.ICMessageViewHolder
Parameters:
Parameter | Description |
---|---|
avatar | avatar bitmap |
setMessageViewStyle
This method sets style to conversation message view holder
Syntax: public void setMessageViewStyle(com.imimobile.connect.ui.ICMessageViewStyle style)
Specified by: setMessageViewStyle in class com.imimobile.connect.ui.ICMessageViewHolder
Parameters:
Parameter | Description |
---|---|
style | message view style |
getPartContainerViewHolder
This method returns message part container view holder
Syntax: public com.imimobile.connect.ui.views.partviews.ICMessagePartContainerViewHolder getPartContainerViewHolder()
Specified by: getPartContainerViewHolder in class com.imimobile.connect.ui.ICMessageViewHolder
Returns: returns message part container view holder
setStatusVisibility
This method used to set visibility for Status View in conversation Message view holder
Syntax: public void setStatusVisibility(int visibility)
Parameters:
Parameter | Description |
---|---|
visibility | One of View.VISIBLE, View.INVISIBLE, or View.GONE |
setQuickReplyVisibility
This method used to set visibility for QuickReply View in conversation Message view holder
Syntax: public void setQuickReplyVisibility(int visibility)
Parameters:
Parameter | Description |
---|---|
visibility | One of View.VISIBLE, View.INVISIBLE, or View.GONE |
setOnRetryClickListener
This method allows to register an object, which implements the ICConversationRecyclerView.OnRetryClickListener interface to listen for retry events.
Syntax: public void setOnRetryClickListener(com.imimobile.connect.ui.conversation.ICRetryClickListener onRetryClickListener)
Parameters:
Parameter | Description |
---|---|
onRetryClickListener | retry click listener |
setButtonClickListener
This method sets an ICButtonClickListener that will be notified when ICButton click events occur.
Syntax: public void setButtonClickListener(ICButtonClickListener listener)
Parameters:
Parameter | Description |
---|---|
listener | ICButtonClickListener instance |
Concrete implementation of ICMessageViewHolder
for use with ICConversationRecyclerView
.
Refer ICMessageViewFactory
, for details of the base methods, that are overridden by this class. In addition to the base, the method overrides this class exposes the following methods.
setTimeVisibility
This method sets the visibility of the time display
  Syntax: boolean setTimeVisibilty(int visibility)
setStatusVisibility
This method sets the visibility of the status display.
  Syntax: boolean setStatusVisibility(int visibility)
setOnRetryClickListener
This method Sets the listener which will be invoked when the retry message publication button is pressed.
  Syntax: boolean setOnRetryClickListener(ICRetryClickListener listener)
com.imimobile.connect.ui.views.partviews.media.generic
ICGenericTemplateElementDetailsDialog
This class implements the ICGenericTemplateElementViewAdapter and will represent the generic template element details.
Constructor Detail
This method used to create the ICGenericTemplateElementDetailsDialog class instance.
ICGenericTemplateElementDetailsDialog
This method used to create the ICGenericTemplateElementDetailsDialog class instance.
Syntax: public ICGenericTemplateElementDetailsDialog(Context context, ICButtonClickListener listener)
Parameters:
Parameter | Description |
---|---|
context | Application context |
listener | To listen the button click events |
Methods
setStyle
This method sets style for the generic template element details view
Syntax: public void setStyle(ICGenericTemplateElementDetailsStyle style)
Parameters:
Parameter | Description |
---|---|
style | ICGenericTemplateElementViewStyle instance |
setData
This method sets the message data and element to display the generic template element details view
Syntax: public void setData(com.imimobile.connect.core.messaging.ICMessageData messageData, @NonNull com.imimobile.connect.core.messaging.ICGenericTemplateElement element)
Parameters:
Parameter | Description |
---|---|
messageData | message data |
element | generic template element |
onClick
Syntax: public void onClick(android.view.View v)
Specified by: onClick in interface android.view.View.OnClickListener
ICGenericTemplateElementDetailsStyle
This class provides style attributes that are utilized by ICGenericTemplateElementDetailsDialog for customization of generic template element details view components.
Syntax: public ICGenericTemplateElementDetailsStyle()
getBackgroundResource
This method gets the background resource id for generic template details view.
Syntax: public int getBackgroundResource()
Returns: background resource id
setBackgroundResource
This method sets the background resource id for generic template details view.
Syntax: public void setBackgroundResource(int backgroundResource)
Parameters:
Parameter | Description |
---|---|
backgroundResource | background resource id |
getBackgroundColor
This method gets the background color for generic template details view.
Syntax: public int getBackgroundColor()
Returns: background color
setBackgroundColor
This method sets the background color for generic template details view.
Syntax: ``public void setBackgroundColor(int backgroundColor)
Parameters:
Parameter | Description |
---|---|
backgroundColor | background color |
getTitleBarHeight
This method gets the height for title bar.
Syntax: public int getTitleBarHeight()
Returns: height
setTitleBarHeight
This method sets the height for title bar.
Syntax: public void setTitleBarHeight(int titleBarHeight)
Parameters:
Parameter | Description |
---|---|
titleBarHeight | height |
getCloseButtonWidth
This method gets the width for close button.
Syntax: public int getCloseButtonWidth()
Returns: width
setCloseButtonWidth
This method sets the width for close button.
Syntax: ``public void setCloseButtonWidth(int closeButtonWidth)
Parameters:
Parameter | Description |
---|---|
closeButtonWidth | width |
getCloseButtonHeight
This method gets the height for close button.
Syntax: public int getCloseButtonHeight()
Returns: height
setCloseButtonHeight
This method sets the height for close button.
Syntax: public void setCloseButtonHeight(int closeButtonHeight)
Parameters:
Parameter | Description |
---|---|
closeButtonHeight | height |
getCloseButtonMarginBottom
This method gets the margin bottom for close button.
Syntax: public int getCloseButtonMarginBottom()
Returns: margin bottom
getCloseButtonMarginLeft
This method gets the margin left for close button.
Syntax: public int getCloseButtonMarginLeft()
Returns: margin left
getCloseButtonMarginRight
This method gets the margin right for close button.
Syntax: public int getCloseButtonMarginRight()
Returns: margin right
getCloseButtonMarginTop
This method gets the margin top for close button.
Syntax: public int getCloseButtonMarginTop()
Returns: margin top
setCloseButtonMargin
This method sets the margin for close button.
Syntax: public void setCloseButtonMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
getCloseButtonImageResource
This method gets the image resource for close button.
Syntax: public int getCloseButtonImageResource()
Returns: image resource
setCloseButtonImageResource
This method sets the image resource for close button.
Syntax: public void setCloseButtonImageResource(int closeButtonImageResource)
Parameters:
Parameter | Description |
---|---|
closeButtonImageResource | image resource |
getImageBackgroundColor
This method gets the background color for image.
Syntax: public int getImageBackgroundColor()
Returns: background color
setImageBackgroundColor
This method sets the background color for image.
Syntax: public void setImageBackgroundColor(int imageBackgroundColor)
Parameters:
Parameter | Description |
---|---|
imageBackgroundColor | background color |
getImageMarginBottom
This method gets the margin bottom for image.
Syntax: public int getImageMarginBottom()
Returns: margin bottom
getImageMarginLeft
This method gets the margin left for image.
Syntax: public int getImageMarginLeft()
Returns: margin left
getImageMarginRight
This method gets the margin right for image.
Syntax: public int getImageMarginRight()
Returns: margin right
getImageMarginTop
This method gets the margin top for image.
Syntax: public int getImageMarginTop()
Returns: margin top
setImageMargin
This method sets the margin for image.
Syntax: public void setImageMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
visibility | margin bottom |
left | margin left |
right | margin right |
top | margin top |
getImageScaleType
This method gets the image scale type.
Syntax: public android.widget.ImageView.ScaleType getImageScaleType()
Returns: image scale type
setImageScaleType
This method sets the image scale type.
Syntax: public void setImageScaleType(android.widget.ImageView.ScaleType imageScaleType)
Parameters:
Parameter | Description |
---|---|
imageScaleType | image scale type |
getImageDotIndicatorMarginBottom
This method gets the margin bottom for image dot-indicator.
Syntax: public int getImageDotIndicatorMarginBottom()
Returns: margin bottom
getImageDotIndicatorMarginLeft
This method gets the margin left for image dot-indicator.
Syntax: public int getImageDotIndicatorMarginLeft()
Returns: margin left
getImageDotIndicatorMarginRight
This method gets the margin right for image dot-indicator.
Syntax: public int getImageDotIndicatorMarginRight()
Returns: margin right
getImageDotIndicatorMarginTop
This method gets the margin top for image dot-indicator.
Syntax: public int getImageDotIndicatorMarginTop()
Returns: margin top
setImageDotIndicatorMargin
This method sets the margin for image dot-indicator.
Syntax: public void setImageDotIndicatorMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom - | margin bottom |
left | margin left |
right | margin right |
top | margin top |
getImageDotIndicatorColor
This method gets the color for image dot-indicator.
Syntax: public int getImageDotIndicatorColor()
Returns: color
setImageDotIndicatorColor
This method sets the color for image dot-indicator.
Syntax: public void setImageDotIndicatorColor(int imageDotIndicatorColor)
Parameters:
Parameter | Description |
---|---|
imageDotIndicatorColor | color |
getImageDotIndicatorCornerRadius
This method gets the corner radius for image dot-indicator.
Syntax: public int getImageDotIndicatorCornerRadius()
Returns: corner radius
setImageDotIndicatorCornerRadius
This method sets the corner radius for image dot-indicator.
Syntax: public void setImageDotIndicatorCornerRadius(int imageDotIndicatorCornerRadius)
Parameters:
Parameter | Description |
---|---|
imageDotIndicatorCornerRadius | corner radius |
getImageDotIndicatorSize
This method gets the size for image dot-indicator.
Syntax: public int getImageDotIndicatorSize()
Returns: size
setImageDotIndicatorSize
This method sets the size for image dot-indicator.
Syntax: public void setImageDotIndicatorSize(int imageDotIndicatorSize)
Parameters:
Parameter | Description |
---|---|
imageDotIndicatorSize | size |
getImageDotIndicatorSpacing
This method gets the spacing for image dot-indicator.
Syntax: public int getImageDotIndicatorSpacing()
Returns: spacing
setImageDotIndicatorSpacing
This method sets the spacing for image dot-indicator.
Syntax: public void setImageDotIndicatorSpacing(int imageDotIndicatorSpacing)
Parameters:
Parameter | Description |
---|---|
imageDotIndicatorSpacing | spacing |
getImageDotIndicatorStrokeColor
This method gets the stroke color for image dot-indicator.
Syntax: public int getImageDotIndicatorStrokeColor()
Returns: stroke color
setImageDotIndicatorStrokeColor
This method sets the stroke color for image dot-indicator.
Syntax: public void setImageDotIndicatorStrokeColor(int imageDotIndicatorStrokeColor)
Parameters:
Parameter | Description |
---|---|
imageDotIndicatorStrokeColor | stroke color |
getImageDotIndicatorStrokeWidth
This method gets the stroke width for image dot-indicator.
Syntax: public int getImageDotIndicatorStrokeWidth()
Returns: width
setImageDotIndicatorStrokeWidth
This method sets the stroke width for image dot-indicator.
Syntax: public void setImageDotIndicatorStrokeWidth(int imageDotIndicatorStrokeWidth)
Parameters:
Parameter | Description |
---|---|
imageDotIndicatorStrokeWidth | width |
getTitleTextColor
This method gets the text color for title.
Syntax: public int getTitleTextColor()
Returns: text color
setTitleTextColor
This method sets the text color for title.
Syntax: public void setTitleTextColor(int titleTextColor)
Parameters:
Parameter | Description |
---|---|
titleTextColor | text color |
getTitleTextSize
This method gets the text size for title.
Syntax: public float getTitleTextSize()
Returns: text size
setTitleTextSize
This method sets the text size for title.
Syntax: public void setTitleTextSize(float titleTextSize)
Parameters:
Parameter | Description |
---|---|
titleTextSize | text size |
getTitleTextTypeface
This method gets the text typeface for title.
Syntax: public android.graphics.Typeface getTitleTextTypeface()
Returns: text typeface
setTitleTextTypeface
This method sets the text typeface for title.
Syntax: public void setTitleTextTypeface(android.graphics.Typeface titleTextTypeface)
Parameters:
Parameter | Description |
---|---|
titleTextTypeface | text typeface |
getTitleTextAlignment
This method gets the text alignment for title.
Syntax: public int getTitleTextAlignment()
Returns: text alignment
setTitleTextAlignment
This method sets the text alignment for title.
Syntax: public void setTitleTextAlignment(int titleTextAlignment)
Parameters:
Parameter | Description |
---|---|
titleTextAlignment | text alignment |
getTitleMarginBottom
This method gets the margin bottom for title.
Syntax: public int getTitleMarginBottom()
Returns: margin bottom
getTitleMarginLeft
This method gets the margin left for title.
Syntax: public int getTitleMarginLeft()
Returns: margin left
getTitleMarginRight
This method gets the margin right for title.
Syntax: public int getTitleMarginRight()
Returns: margin right
getTitleMarginTop
This method gets the margin top for title.
Syntax: public int getTitleMarginTop()
Returns: margin top
setTitleMargin
This method sets the margin for title.
Syntax: public void setTitleMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom - margin bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
getTitleTextMaxLines
This method gets the text max lines for title.
Syntax: public int getTitleTextMaxLines()
Returns: text max lines
setTitleTextMaxLines
This method sets the text max lines for title.
Syntax: public void setTitleTextMaxLines(int titleTextMaxLines)
Parameters:
Parameter | Description |
---|---|
titleTextMaxLines | text max lines |
getSubTitleTextColor
This method gets the text color for sub title.
Syntax: public int getSubTitleTextColor()
Returns: text color
setSubTitleTextColor
This method sets the text color for sub title.
Syntax: public void setSubTitleTextColor(int subTitleTextColor)
Parameters:
Parameter | Description |
---|---|
subTitleTextColor | text color |
getSubTitleTextSize
This method gets the text size for sub title.
Syntax: public float getSubTitleTextSize()
Returns: text size
setSubTitleTextSize
This method sets the text size for sub title.
Syntax: public void setSubTitleTextSize(float subTitleTextSize)
Parameters:
Parameter | Description |
---|---|
subTitleTextSize | text size |
getSubTitleTextTypeface
This method gets the text typeface for sub title.
Syntax: public android.graphics.Typeface getSubTitleTextTypeface()
Returns: text typeface
setSubTitleTextTypeface
This method sets the text typeface for sub title.
Syntax: public void setSubTitleTextTypeface(android.graphics.Typeface subTitleTextTypeface)
Parameters:
Parameter | Description |
---|---|
subTitleTextTypeface | text typeface |
getSubTitleTextAlignment
This method gets the text alignment for sub title.
Syntax: public int getSubTitleTextAlignment()
Returns: text alignment
setSubTitleTextAlignment
This method sets the text alignment for sub title.
Syntax: public void setSubTitleTextAlignment(int subTitleTextAlignment)
Parameters:
Parameter | Description |
---|---|
subTitleTextAlignment | text alignment |
getSubTitleMarginBottom
This method gets the margin bottom for sub title.
Syntax: public int getSubTitleMarginBottom()
Returns: margin bottom
getSubTitleMarginLeft
This method gets the margin left for sub title.
Syntax: public int getSubTitleMarginLeft()
Returns: margin left
getSubTitleMarginRight
This method gets the margin right for sub title.
Syntax: public int getSubTitleMarginRight()
Returns: margin right
getSubTitleMarginTop
This method gets the margin top for sub title.
Syntax: public int getSubTitleMarginTop()
Returns: margin top
setSubTitleMargin
This method sets the margin for sub title.
Syntax: public void setSubTitleMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
getSubTitleTextMaxLines
This method gets the text max lines for sub title.
Syntax: public int getSubTitleTextMaxLines()
Returns: text max lines
setSubTitleTextMaxLines
This method sets the text max lines for sub title.
Syntax: public void setSubTitleTextMaxLines(int subTitleTextMaxLines)
Parameters:
Parameter | Description |
---|---|
subTitleTextMaxLines | text max lines |
getSubTitleTextLineSpacingExtra
This method gets the text line spacing extra for sub title.
Syntax: public int getSubTitleTextLineSpacingExtra()
Returns: text line spacing extra
setSubTitleTextLineSpacingExtra
This method sets the text line spacing extra for sub title.
Syntax: public void setSubTitleTextLineSpacingExtra(int subTitleTextLineSpacingExtra)
Parameters:
Parameter | Description |
---|---|
subTitleTextLineSpacingExtra | text line spacing extra |
getPrimaryButtonHeight
This method gets the height for primary button.
Syntax: public int getPrimaryButtonHeight()
Returns: height
setPrimaryButtonHeight
This method sets the height for primary button.
Syntax: public void setPrimaryButtonHeight(int primaryButtonHeight)
Parameters:
Parameter | Description |
---|---|
primaryButtonHeight | height |
getPrimaryButtonBackgroundResource
This method gets the background resource for primary button.
Syntax: public int getPrimaryButtonBackgroundResource()
Returns: background resource
setPrimaryButtonBackgroundResource
This method sets the background resource for primary button.
Syntax: public void setPrimaryButtonBackgroundResource(int primaryButtonBackgroundResource)
Parameters:
Parameter | Description |
---|---|
primaryButtonBackgroundResource | background resource |
getPrimaryButtonTextColor
This method gets the text color for primary button.
Syntax: public int getPrimaryButtonTextColor()
Returns: text color
setPrimaryButtonTextColor
This method sets the text color for primary button.
Syntax: public void setPrimaryButtonTextColor(int primaryButtonTextColor)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextColor | text color |
getPrimaryButtonTextSize
This method gets the text size for primary button.
Syntax: public float getPrimaryButtonTextSize()
Returns: text size
setPrimaryButtonTextSize
This method sets the text size for primary button.
Syntax: public void setPrimaryButtonTextSize(float primaryButtonTextSize)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextSize | text size |
getPrimaryButtonTextTypeface
This method gets the text typeface for primary button.
Syntax: public android.graphics.Typeface getPrimaryButtonTextTypeface()
Returns: text typeface
setPrimaryButtonTextTypeface
This method sets the text typeface for primary button.
Syntax: public void setPrimaryButtonTextTypeface(android.graphics.Typeface primaryButtonTextTypeface)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextTypeface | text typeface |
getPrimaryButtonTextAlignment
This method gets the text alignment for primary button.
Syntax: public int getPrimaryButtonTextAlignment()
Returns: text alignment
setPrimaryButtonTextAlignment
This method gets the text alignment for primary button.
Syntax: public void setPrimaryButtonTextAlignment(int primaryButtonTextAlignment)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextAlignment | text alignment |
getPrimaryButtonMarginBottom
This method gets the margin bottom for primary button.
Syntax: public int getPrimaryButtonMarginBottom()
Returns: margin bottom
getPrimaryButtonMarginLeft
This method gets the margin left for primary button.
Syntax: public int getPrimaryButtonMarginLeft()
Returns: margin left
getPrimaryButtonMarginRight
This method gets the margin right for primary button.
Syntax: public int getPrimaryButtonMarginRight()
Returns: margin right
getPrimaryButtonMarginTop
This method gets the margin top for primary button.
Syntax: public int getPrimaryButtonMarginTop()
Returns: margin top
setPrimaryButtonMargin
This method sets the margin for primary button.
Syntax: public void setPrimaryButtonMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin ledt |
right | margin right |
top | margin top |
isPrimaryButtonTextAllCaps
This method gets the text all caps for primary button.
Syntax: public boolean isPrimaryButtonTextAllCaps()
Returns: true if text is all caps otherwise false
setPrimaryButtonTextAllCaps
This method is used to enable the text all caps for primary button.
Syntax: public void setPrimaryButtonTextAllCaps(boolean primaryButtonTextAllCaps)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextAllCaps | text is all caps |
getSecondaryButtonHeight
This method gets the height for secondary button.
Syntax: public int getSecondaryButtonHeight()
Returns: Height
setSecondaryButtonHeight
This method sets the height for secondary button.
Syntax: public void setSecondaryButtonHeight(int secondaryButtonHeight)
Parameters:
Parameter | Description |
---|---|
secondaryButtonHeight | height |
getSecondaryButtonBackgroundResource
This method gets the background resource for secondary button.
Syntax: public int getSecondaryButtonBackgroundResource()
Returns: background resource
setSecondaryButtonBackgroundResource
This method sets the background resource for secondary button.
Syntax: public void setSecondaryButtonBackgroundResource(int secondaryButtonBackgroundResource)
Parameters:
Parameter | Description |
---|---|
secondaryButtonBackgroundResource | background resource |
getSecondaryButtonTextColor
This method gets the text color for secondary button.
Syntax: public int getSecondaryButtonTextColor()
Returns: text color
setSecondaryButtonTextColor
This method sets the text color for secondary button.
Syntax: public void setSecondaryButtonTextColor(int secondaryButtonTextColor)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextColor | text color |
getSecondaryButtonTextSize
This method gets the text size for secondary button.
Syntax: public float getSecondaryButtonTextSize()
Returns: text size
setSecondaryButtonTextSize
This method sets the text size for secondary button.
Syntax: public void setSecondaryButtonTextSize(float secondaryButtonTextSize)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextSize | text size |
getSecondaryButtonTextTypeface
This method gets the text typeface for secondary button.
Syntax: public android.graphics.Typeface getSecondaryButtonTextTypeface()
Returns: text typeface
setSecondaryButtonTextTypeface
This method sets the text typeface for secondary button.
Syntax: public void setSecondaryButtonTextTypeface(android.graphics.Typeface secondaryButtonTextTypeface)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextTypeface | text typeface |
getSecondaryButtonTextAlignment
This method gets the text alignment for secondary button.
Syntax: public int getSecondaryButtonTextAlignment()
Returns: text alignment
setSecondaryButtonTextAlignment
This method sets the text alignment for secondary button.
Syntax: public void setSecondaryButtonTextAlignment(int secondaryButtonTextAlignment)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextAlignment | text alignment |
getSecondaryButtonMarginBottom
This method gets the margin bottom for secondary button.
Syntax: public int getSecondaryButtonMarginBottom()
Returns: margin bottom
getSecondaryButtonMarginLeft
This method gets the margin left for secondary button.
Syntax: public int getSecondaryButtonMarginLeft()
Returns: margin left
getSecondaryButtonMarginRight
This method gets the margin right for secondary button.
Syntax: public int getSecondaryButtonMarginRight()
Returns: margin right
getSecondaryButtonMarginTop
This method gets the margin top for secondary button.
Syntax: public int getSecondaryButtonMarginTop()
Returns: margin top
setSecondaryButtonMargin
This method sets the margin for secondary button.
Syntax: public void setSecondaryButtonMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
isSecondaryButtonTextAllCaps
This method gets the text all caps for secondary button.
Syntax: public boolean isSecondaryButtonTextAllCaps()
Returns: true if text is all caps otherwise false
setSecondaryButtonTextAllCaps
This method is used to enable the text all caps for secondary button.
Syntax: public void setSecondaryButtonTextAllCaps(boolean secondaryButtonTextAllCaps)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextAllCaps | text is all caps |
ICGenericTemplateElementViewAdapter
This class implements the ICGenericTemplatePartViewHolder and will represent the generic template elements view.
ICGenericTemplateElementViewAdapter
This method used to create the ICGenericTemplateElementViewAdapter class instance.
Syntax: public ICGenericTemplateElementViewAdapter(android.content.Context context, ICGenericTemplateElementViewAdapter.OnElementClickListener itemClickListener, ICButtonClickListener buttonClickListener)
Parameters:
Parameter | Description |
---|---|
context | Application context |
itemClickListener | To listen the element click events |
buttonClickListener | To listen the button click events |
Methods
setRecyclerView
This method sets the recycler view.
Syntax: public void setRecyclerView(androidx.recyclerview.widget.RecyclerView recyclerView)
Parameters:
Parameter | Description |
---|---|
recyclerView | recycler view instance |
setStyle
This method sets style for the generic template element view
Syntax: public void setStyle(ICGenericTemplateElementViewStyle style)
Parameters:
Parameter | Description |
---|---|
style | ICGenericTemplateElementViewStyle instance |
setData
This method sets the message data with elements to display view
Syntax: public void setData(com.imimobile.connect.core.messaging.ICMessageData messageData, java.util.List<com.imimobile.connect.core.messaging.ICGenericTemplateElement> elements)
Parameters:
Parameter | Description |
---|---|
messageData | message data |
elements | list of generic template elements |
onCreateViewHolder
This method calls onCreateViewHolder(ViewGroup, int) to create a new GenericTemplateElementViewHolder and initializes some private fields to be used by RecyclerView.
Syntax: @NonNull public androidx.recyclerview.widget.RecyclerView.ViewHolder onCreateViewHolder(@NonNull android.view.ViewGroup parent, int viewType)
Specified by: onCreateViewHolder in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
Parameters:
Parameter | Description |
---|---|
parent | ViewGroup |
viewType | int |
Returns: VH
onBindViewHolder
Called by RecyclerView to display the data at the specified position. This method should update the contents of the GenericTemplateElementViewHolder.itemView to reflect the item at the given position.
Syntax: public void onBindViewHolder(@NonNull androidx.recyclerview.widget.RecyclerView.ViewHolder holder, int position)
Specified by: onBindViewHolder in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
Parameters:
Parameter | Description |
---|---|
holder | - |
position | - |
getItemCount
Returns the total number of items in the data set held by the adapter.
Syntax: public int getItemCount()
Specified by: getItemCount in class androidx.recyclerview.widget.RecyclerView.Adapter<androidx.recyclerview.widget.RecyclerView.ViewHolder>
Returns: The total number of items in this adapter.
ICGenericTemplateElementViewAdapter.OnElementClickListener
This interface used to listen the generic template element click events
Method
onElementClick
This method invoked on the element clicked
Syntax: void onElementClick(com.imimobile.connect.core.messaging.ICMessageData messageData, com.imimobile.connect.core.messaging.ICGenericTemplateElement element)
Parameters:
Parameter | Description |
---|---|
messageData | selected message data |
element | selected element |
ICGenericTemplateElementViewStyle
This class provides style attributes that are utilized by ICGenericTemplateElementViewAdapter for customization of generic template element view components.
Constructor Detail
ICGenericTemplateElementViewStyle
Syntax: public ICGenericTemplateElementViewStyle()
Method Detail
getWidth
This method gets width for generic template element view.
Syntax: public int getWidth()
Returns: width for generic template element view.
setWidth
This method set width for generic template element view.
Syntax: public void setWidth(int width)
Parameters:
Parameter | Description |
---|---|
width | for generic template element view. |
getHeight
This method gets height for generic template element view.
Syntax: public int getHeight()
Returns: height for generic template element view.
setHeight
This method sets height for generic template element view.
Syntax: public void setHeight(int height)
Parameters:
Parameter | Description |
---|---|
height | height for generic template element view. |
getBackgroundColor
This method gets the background color for generic template element view.
Syntax: public int getBackgroundColor()
Returns: background color
setBackgroundColor
This method sets the background color for generic template element view.
Syntax: public void setBackgroundColor(int backgroundColor)
Parameters:
Parameter | Description |
---|---|
backgroundColor | background color |
getForegroundResource
This method gets the foreground resource for generic template element view.
Syntax: public int getForegroundResource()
Returns: foreground resource
setForegroundResource
This method sets the foreground resource for generic template element view.
Syntax: public void setForegroundResource(int foregroundResource)
Parameters:
Parameter | Description |
---|---|
foregroundResource | foreground resource |
getCornerRadius
This method gets the corner radius for generic template element view.
Syntax: public float getCornerRadius()
Returns: corner radius
setCornerRadius
This method sets the corner radius for generic template element view.
Syntax: public void setCornerRadius(float cornerRadius)
Parameters:
Parameter | Description |
---|---|
cornerRadius | corner radius |
getMarginBottom
This method gets the margin bottom for generic template element view.
Syntax: public int getMarginBottom()
Returns: margin bottom
getMarginLeft
This method gets the margin left for generic template element view.
Syntax: public int getMarginLeft()
Returns: margin left
getMarginRight
This method gets the margin right for generic template element view.
Syntax: public int getMarginRight()
Returns: margin right
getMarginTop
This method gets the margin top for generic template element view.
Syntax: public int getMarginTop()
Returns: margin top
setMargin
This method sets the margin for generic template element view.
Syntax: public void setMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
getPaddingBottom
This method gets the padding bottom for generic template element view.
Syntax: public int getPaddingBottom()
Returns: padding bottom
getPaddingLeft
This method gets the padding left for generic template element view.
Syntax: public int getPaddingLeft()
Returns: padding left
getPaddingRight
This method gets the padding right for generic template element view.
Syntax: public int getPaddingRight()
Returns: padding right
getPaddingTop
This method gets the padding top for generic template element view.
Syntax: public int getPaddingTop()
Returns:padding top
setPadding
This method sets the padding for generic template element view.
Syntax: public void setPadding(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | padding bottom |
left | padding left |
right | padding right |
top | padding top |
getImageScaleType
This method gets the image scale type.
Syntax: public android.widget.ImageView.ScaleType getImageScaleType()
Returns: image scale type
setImageScaleType
This method sets the image scale type.
Syntax: public void setImageScaleType(android.widget.ImageView.ScaleType imageScaleType)
Parameters:
Parameter | Description |
---|---|
imageScaleType | image scale type |
getTitleBackgroundColor
This method gets the title background color.
Syntax: public int getTitleBackgroundColor()
Returns: title background color
setTitleBackgroundColor
This method sets the title background color.
Syntax: public void setTitleBackgroundColor(int titleBackgroundColor)
Parameters:
Parameter | Description |
---|---|
titleBackgroundColor | title background color |
getTitleBackgroundPaddingBottom
This method gets the padding bottom for title background.
Syntax: public int getTitleBackgroundPaddingBottom()
Returns: padding bottom
getTitleBackgroundPaddingLeft
This method gets the padding left for title background.
Syntax: public int getTitleBackgroundPaddingLeft()
Returns: padding left
getTitleBackgroundPaddingRight
This method gets the padding right for title background.
Syntax: public int getTitleBackgroundPaddingRight()
Returns: padding right
getTitleBackgroundPaddingTop
This method gets the padding top for title background.
Syntax: public int getTitleBackgroundPaddingTop()
Returns: padding top
setTitleBackgroundPadding
This method sets the padding for title background.
Syntax: public void setTitleBackgroundPadding(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | padding bottom |
left | padding left |
right | padding right |
top | padding top |
getTitleTextColor
This method gets the text color for title.
Syntax: public int getTitleTextColor()
Returns: text color
setTitleTextColor
This method sets the text color for title.
Syntax: public void setTitleTextColor(int titleTextColor)
Parameters:
Parameter | Description |
---|---|
titleTextColor | text color |
getTitleTextSize
This method gets the text size for title.
Syntax: public float getTitleTextSize()
Returns: text size
setTitleTextSize
This method sets the text size for title.
Syntax: public void setTitleTextSize(float titleTextSize)
Parameters:
Parameter | Description |
---|---|
titleTextSize | text size |
getTitleTextTypeface
This method gets the text typeface for title.
Syntax: public android.graphics.Typeface getTitleTextTypeface()
Returns: text typeface
setTitleTextTypeface
This method sets the text typeface for title.
Syntax: public void setTitleTextTypeface(android.graphics.Typeface titleTextTypeface)
Parameters:
Parameter | Description |
---|---|
titleTextTypeface | text typeface |
getTitleTextAlignment
This method gets the text alignment for title.
Syntax: public int getTitleTextAlignment()
Returns: text alignment
setTitleTextAlignment
This method sets the text alignment for title.
Syntax: public void setTitleTextAlignment(int titleTextAlignment)
Parameters:
Parameter | Description |
---|---|
titleTextAlignment | text alignment |
getTitleMarginBottom
This method gets the margin bottom for title.
Syntax: public int getTitleMarginBottom()
Returns:margin bottom
getTitleMarginLeft
This method gets the margin left for title.
Syntax: public int getTitleMarginLeft()
Returns:margin left
getTitleMarginRight
This method gets the margin right for title.
Syntax: public int getTitleMarginRight()
Returns: margin right
getTitleMarginTop
This method gets the margin top for title.
Syntax: public int getTitleMarginTop()
Returns: margin top
setTitleMargin
This method sets the margin for title.
Syntax: public void setTitleMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
getTitleTextMaxLines
This method gets the text max lines for title.
Syntax: public int getTitleTextMaxLines()
Returns: text max lines
setTitleTextMaxLines
This method sets the text max lines for title.
Syntax: public void setTitleTextMaxLines(int titleTextMaxLines)
Parameters:
Parameter | Description |
---|---|
titleTextMaxLines | text max lines |
getSubTitleTextColor
This method gets the text color for sub title.
Syntax: public int getSubTitleTextColor()
Returns: text color
setSubTitleTextColor
This method sets the text color for sub title.
Syntax: public void setSubTitleTextColor(int subTitleTextColor)
Parameters:
Parameter | Description |
---|---|
subTitleTextColor | text color |
getSubTitleTextSize
This method gets the text size for sub title.
Syntax: public float getSubTitleTextSize()
Returns: text size
setSubTitleTextSize
This method sets the text size for sub title.
Syntax: public void setSubTitleTextSize(float subTitleTextSize)
Parameters:
Parameter | Description |
---|---|
subTitleTextSize | text size |
getSubTitleTextTypeface
This method gets the text typeface for sub title.
Syntax: public android.graphics.Typeface getSubTitleTextTypeface()
Returns: text typeface
setSubTitleTextTypeface
This method sets the text typeface for sub title.
Syntax: public void setSubTitleTextTypeface(android.graphics.Typeface subTitleTextTypeface)
Parameters:
Parameter | Description |
---|---|
subTitleTextTypeface | text typeface |
getSubTitleTextAlignment
This method gets the text alignment for sub title.
Syntax: public int getSubTitleTextAlignment()
Returns: text alignment
setSubTitleTextAlignment
This method sets the text alignment for sub title.
Syntax: public void setSubTitleTextAlignment(int subTitleTextAlignment)
Parameters:
Parameter | Description |
---|---|
subTitleTextAlignment | text alignment |
getSubTitleMarginBottom
This method gets the margin bottom for sub title.
Syntax: public int getSubTitleMarginBottom()
Returns: margin bottom
getSubTitleMarginLeft
This method gets the margin left for sub title.
Syntax: public int getSubTitleMarginLeft()
Returns: margin left
getSubTitleMarginRight
This method gets the margin right for sub title.
Syntax: public int getSubTitleMarginRight()
Returns: margin right
getSubTitleMarginTop
This method gets the margin top for sub title.
Syntax: public int getSubTitleMarginTop()
Returns: margin top
setSubTitleMargin
This method sets the margin for sub title.
Syntax: public void setSubTitleMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
getSubTitleTextMaxLines
This method gets the text max lines for sub title.
Syntax: public int getSubTitleTextMaxLines()
Returns: text max lines
setSubTitleTextMaxLines
This method sets the text max lines for sub title.
Syntax: public void setSubTitleTextMaxLines(int subTitleTextMaxLines)
Parameters:
Parameter | Description |
---|---|
subTitleTextMaxLines | text max lines |
getPrimaryButtonHeight
This method gets the height for primary button.
Syntax: public int getPrimaryButtonHeight()
Returns: Height
setPrimaryButtonHeight
This method sets the height for primary button.
Syntax: public void setPrimaryButtonHeight(int primaryButtonHeight)
Parameters:
Parameter | Description |
---|---|
primaryButtonHeight | height |
getPrimaryButtonBackgroundResource
This method gets the background resource for primary button.
Syntax: public int getPrimaryButtonBackgroundResource()
Returns: background resource
setPrimaryButtonBackgroundResource
This method sets the background resource for primary button.
Syntax: public void setPrimaryButtonBackgroundResource(int primaryButtonBackgroundResource)
Parameters:
Parameter | Description |
---|---|
primaryButtonBackgroundResource | background resource |
getPrimaryButtonTextColor
This method gets the text color for primary button.
Syntax: public int getPrimaryButtonTextColor()
Returns: text color
setPrimaryButtonTextColor
This method sets the text color for primary button.
Syntax: public void setPrimaryButtonTextColor(int primaryButtonTextColor)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextColor | text color |
##getPrimaryButtonTextSize
This method gets the text size for primary button.
Syntax: public float getPrimaryButtonTextSize()
Returns: text size
setPrimaryButtonTextSize
This method sets the text size for primary button.
Syntax: public void setPrimaryButtonTextSize(float primaryButtonTextSize)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextSize | text size |
getPrimaryButtonTextTypeface
This method gets the text typeface for primary button.
Syntax: public android.graphics.Typeface getPrimaryButtonTextTypeface()
Returns: text typeface
setPrimaryButtonTextTypeface
This method sets the text typeface for primary button.
Syntax: public void setPrimaryButtonTextTypeface(android.graphics.Typeface primaryButtonTextTypeface)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextTypeface | text typeface |
getPrimaryButtonTextAlignment
This method gets the text alignment for primary button.
Syntax: public int getPrimaryButtonTextAlignment()
Returns: text alignment
setPrimaryButtonTextAlignment
This method gets the text alignment for primary button.
Syntax: public void setPrimaryButtonTextAlignment(int primaryButtonTextAlignment)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextAlignment | text alignment |
getPrimaryButtonMarginBottom
This method gets the margin bottom for primary button.
Syntax: public int getPrimaryButtonMarginBottom()
Returns: margin bottom
getPrimaryButtonMarginLeft
This method gets the margin left for primary button.
Syntax: public int getPrimaryButtonMarginLeft()
Returns: margin left
getPrimaryButtonMarginRight
This method gets the margin right for primary button.
Syntax: public int getPrimaryButtonMarginRight()
Returns: margin right
getPrimaryButtonMarginTop
This method gets the margin top for primary button.
Syntax: public int getPrimaryButtonMarginTop()
Returns: margin top
setPrimaryButtonMargin
This method sets the margin for primary button.
Syntax: public void setPrimaryButtonMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
isPrimaryButtonTextAllCaps
This method gets the text all caps for primary button.
Syntax: public boolean isPrimaryButtonTextAllCaps()
Returns: true if text is all caps otherwise false
setPrimaryButtonTextAllCaps
This method is used to enable the text all caps for primary button.
Syntax: public void setPrimaryButtonTextAllCaps(boolean primaryButtonTextAllCaps)
Parameters:
Parameter | Description |
---|---|
primaryButtonTextAllCaps | text is all caps |
getSecondaryButtonHeight
This method gets the height for secondary button.
Syntax: public int getSecondaryButtonHeight()
Returns: Height
setSecondaryButtonHeight
This method sets the height for secondary button.
Syntax: public void setSecondaryButtonHeight(int secondaryButtonHeight)
Parameters:
Parameter | Description |
---|---|
secondaryButtonHeight | height |
getSecondaryButtonBackgroundResource
This method gets the background resource for secondary button.
Syntax: public int getSecondaryButtonBackgroundResource()
Returns: background resource
setSecondaryButtonBackgroundResource
This method sets the background resource for secondary button.
Syntax: public void setSecondaryButtonBackgroundResource(int secondaryButtonBackgroundResource)
Parameters:
Parameter | Description |
---|---|
secondaryButtonBackgroundResource | background resource |
getSecondaryButtonTextColor
This method gets the text color for secondary button.
Syntax: public int getSecondaryButtonTextColor()
Returns: text color
setSecondaryButtonTextColor
This method sets the text color for secondary button.
Syntax: public void setSecondaryButtonTextColor(int secondaryButtonTextColor)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextColor | text color |
getSecondaryButtonTextSize
This method gets the text size for secondary button.
Syntax: public float getSecondaryButtonTextSize()
Returns: text size
setSecondaryButtonTextSize
This method sets the text size for secondary button.
Syntax: public void setSecondaryButtonTextSize(float secondaryButtonTextSize)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextSize | text size |
getSecondaryButtonTextTypeface
This method gets the text typeface for secondary button.
Syntax: public android.graphics.Typeface getSecondaryButtonTextTypeface()
Returns: text typeface
setSecondaryButtonTextTypeface
This method sets the text typeface for secondary button.
Syntax: public void setSecondaryButtonTextTypeface(android.graphics.Typeface secondaryButtonTextTypeface)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextTypeface | text typeface |
getSecondaryButtonTextAlignment
This method gets the text alignment for secondary button.
Syntax: public int getSecondaryButtonTextAlignment()
Returns: text alignment
setSecondaryButtonTextAlignment
This method sets the text alignment for secondary button.
Syntax: public void setSecondaryButtonTextAlignment(int secondaryButtonTextAlignment)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextAlignment | text alignment |
getSecondaryButtonMarginBottom
This method gets the margin bottom for secondary button.
Syntax: public int getSecondaryButtonMarginBottom()
Returns: margin bottom
getSecondaryButtonMarginLeft
This method gets the margin left for secondary button.
Syntax: public int getSecondaryButtonMarginLeft()
Returns: margin left
getSecondaryButtonMarginRight
This method gets the margin right for secondary button.
Syntax: public int getSecondaryButtonMarginRight()
Returns: margin right
getSecondaryButtonMarginTop
This method gets the margin top for secondary button.
Syntax: public int getSecondaryButtonMarginTop()
Returns: margin top
setSecondaryButtonMargin
This method sets the margin for secondary button.
Syntax: public void setSecondaryButtonMargin(int bottom, int left, int right, int top)
Parameters:
Parameter | Description |
---|---|
bottom | margin bottom |
left | margin left |
right | margin right |
top | margin top |
isSecondaryButtonTextAllCaps
This method gets the text all caps for secondary button.
Syntax: public boolean isSecondaryButtonTextAllCaps()
Returns: true if text is all caps otherwise false
setSecondaryButtonTextAllCaps
This method is used to enable the text all caps for secondary button.
Syntax: public void setSecondaryButtonTextAllCaps(boolean secondaryButtonTextAllCaps)
Parameters:
Parameter | Description |
---|---|
secondaryButtonTextAllCaps | text is all caps |
ICGenericTemplatePartViewFactory
Factory class that creates ICGenericTemplatePartViewHolder instances.
Constructor Detail
ICGenericTemplatePartViewFactory
Syntax: public ICGenericTemplatePartViewFactory()
Method Detail
createPartView
This method used to create the message part view holder for GenericTemplate type AttachmentPart , the created message part view holders are added to message part container View holder
Syntax: public ICGenericTemplatePartViewHolder createPartView(android.view.ViewGroup root)
Specified by: createPartView in class com.imimobile.connect.ui.views.partviews.ICMessagePartViewFactory
Parameters:
Parameter | Description |
---|---|
root | message part container view group |
Returns: returns generic template part view holder
getContentType
This method returns content type for message part view factory
Syntax: public java.lang.String getContentType()
Specified by: getContentType in class com.imimobile.connect.ui.views.partviews.ICMessagePartViewFactory
Returns: returns content type for message part view factory
getViewIdentifier
This method returns view identifier
Syntax: public java.lang.String getViewIdentifier(com.imimobile.connect.ui.interfaces.ICMessagePart part)
Specified by: getViewIdentifier in class com.imimobile.connect.ui.views.partviews.ICMessagePartViewFactory
Returns: returns view identifier
Parameters:
Parameter | Description |
---|---|
part | message part |
ICGenericTemplatePartViewHolder
This class implements the ICMessagePartViewHolder and will represent the GenericTemplate part of the message.
Constructor Detail
ICGenericTemplatePartViewHolder
Syntax: public ICGenericTemplatePartViewHolder(android.view.View partView)
This method used to create the ICGenericTemplatePartViewHolder class instance.
Parameters:
partView - generic template part view
• Method Detail
• registerListener
public static void registerListener(ICButtonClickListener listener)
This method registers an ICButtonClickListener that will be notified when ICButton click events occur.
Parameters:
listener - ICButtonClickListener instance
• unregisterListener
public static void unregisterListener(ICButtonClickListener listener)
This method unregisters a previously registered ICButtonClickListener instance. The instance will no longer receive ICButton click events occur.
Parameters:
listener - ICButtonClickListener instance
• bindMessagePart
public boolean bindMessagePart(com.imimobile.connect.ui.interfaces.ICMessagePart part, com.imimobile.connect.core.messaging.ICMessageData message)
This method binds the GenericTemplate message part to MessagePartViewHolder
Specified by:
bindMessagePart in class com.imimobile.connect.ui.views.partviews.ICMessagePartViewHolder
Parameters:
part - message part
message - message data
Returns:
returns true binding message part is successful with MessagePartViewHolder, false otherwise
• setMessageViewStyle
public void setMessageViewStyle(com.imimobile.connect.ui.ICMessageViewStyle style)
This method sets message view style to GenericTemplate message part view holder
Overrides:
setMessageViewStyle in class com.imimobile.connect.ui.views.partviews.ICMessagePartViewHolder
Parameters:
style - message view style
ICGenericTemplatePartViewStyle
This class provides style attributes that are utilized by ICGenericTemplatePartViewHolder for customization of generic template part view components.
• Constructor Detail
• ICGenericTemplatePartViewStyle
public ICGenericTemplatePartViewStyle()
• Method Detail
• getBackgroundResource
public int getBackgroundResource()
This method gets the background resource id for generic template view.
Returns:
background resource id
• setBackgroundResource
public void setBackgroundResource(int backgroundResource)
This method sets the background resource id for generic template view.
Parameters:
backgroundResource - background resource id
• getBackgroundColor
public int getBackgroundColor()
This method gets the background color for generic template view.
Returns:
background color
• setBackgroundColor
public void setBackgroundColor(int backgroundColor)
This method sets the background color for generic template view.
Parameters:
backgroundColor - background color
• getMarginBottom
public int getMarginBottom()
This method gets the margin bottom
Returns:
margin bottom
• getMarginLeft
public int getMarginLeft()
This method gets the margin left
Returns:
margin left
• getMarginRight
public int getMarginRight()
This method gets the margin right
Returns:
margin right
• getMarginTop
public int getMarginTop()
This method gets the margin top
Returns:
margin top
• setMargin
public void setMargin(int bottom, int left, int right, int top)
This method sets the margin
Parameters:
bottom - margin bottom
left - margin left
right - margin right
top - margin top
• getPaddingBottom
public int getPaddingBottom()
This method gets the padding bottom
Returns:
padding bottom
• getPaddingLeft
public int getPaddingLeft()
This method gets the padding left
Returns:
padding left
• getPaddingRight
public int getPaddingRight()
This method gets the padding right
Returns:
padding right
• getPaddingTop
public int getPaddingTop()
This method gets the padding top
Returns:
padding top
• setPadding
public void setPadding(int bottom, int left, int right, int top)
This method sets the padding
Parameters:
bottom - padding bottom
left - padding left
right - padding right
top - padding top
• getElementStyle
public ICGenericTemplateElementViewStyle getElementStyle()
This method gets the generic template element view style
Returns:
generic template element view style
• setElementStyle
public void setElementStyle(ICGenericTemplateElementViewStyle elementStyle)
This method sets the generic template element view style
Parameters:
elementStyle - generic template element view style
• getElementDetailsStyle
public ICGenericTemplateElementDetailsStyle getElementDetailsStyle()
This method gets the generic template element details style
Returns:
generic template element details style
• setElementDetailsStyle
public void setElementDetailsStyle(ICGenericTemplateElementDetailsStyle elementDetailsStyle)
This method sets the generic template element details style
Parameters:
elementDetailsStyle - generic template element details style
2.2.3 com.imimobile.connect.ui.views.quickreply
ICQuickReplyView
This class implements the ICConversationMessageViewHolder and will represent the quick reply view part of the message.
• Constructor Detail
• ICQuickReplyView
public ICQuickReplyView(android.content.Context context)
This method used to create the ICQuickReplyView class instance.
Parameters:
context - Context: This value cannot be null.
• ICQuickReplyView
• public ICQuickReplyView(android.content.Context context,
android.util.AttributeSet attrs)
This method used to create the ICQuickReplyView class instance.
Parameters:
context - Context: This value cannot be null.
attrs - AttributeSet: This value may be null.
• ICQuickReplyView
• public ICQuickReplyView(android.content.Context context,
• android.util.AttributeSet attrs,
int defStyleAttr)
This method used to create the ICQuickReplyView class instance.
Parameters:
context - Context: This value cannot be null.
attrs - AttributeSet: This value may be