Forward

Forward message is a feature that allows users to forward the image and text message. Forward message appears in the ForwardMessageFragment class.

In MirrorFly UIKit for Android, there are currently two type of messages that users can forward : text and image. These text message and image file can be shared with other members in the single chat from the sender’s mobile device.

Forward Message Screen#

image_preview

Forward Message Flow#

image_preview

The following are the forward message AppBar style and attributes for customizations.#
<style name="Custom" parent="MirrorFly">
<item name="mf_appbar_style">@style/CustomAppBar</item>
</style>
<style name="CustomAppBar" parent="Widget.MirrorFly.AppBar">
<item name="android:background">@color/primary_300</item>
<item name="mf_appbar_title_appearance">@style/MirrorFlyH2OnDark01</item>
<item name="mf_appbar_description_appearance">@style/MirrorFlyCaption2OnDark02</item>
<item name="mf_appbar_divider_color">@color/primary_500</item>
<item name="mf_appbar_left_button_text_appearance">@style/MirrorFlyButtonOnDark01</item>
<item name="mf_appbar_left_button_text_color">@color/selector_on_primary</item>
<item name="mf_appbar_left_button_tint">@color/ondark_01</item>
<item name="mf_appbar_left_button_background">@drawable/mf_button_uncontained_background_custom</item>
<item name="mf_appbar_right_button_text_appearance">@style/MirrorFlyButtonOnDark01</item>
<item name="mf_appbar_right_button_text_color">@color/selector_on_primary</item>
<item name="mf_appbar_right_button_tint">@color/ondark_01</item>
<item name="mf_appbar_right_button_background">@drawable/mf_button_uncontained_background_custom</item>
</style>
The following are the forward message Recyclerview style and attributes for customizations.#
<style name="Custom" parent="MirrorFly">
<item name="mf_recycler_view_style">@style/CustomRecyclerView</item>
</style>
<style name="CustomRecyclerView" parent="Widget.MirrorFly.RecyclerView">
<item name="android:background">@color/background_50</item>
<item name="mf_pager_recycler_view_use_divide_line">true</item>
<item name="mf_pager_recycler_view_divide_line_color">@color/onlight_04</item>
<item name="mf_pager_recycler_view_divide_line_height">@dimen/mf_size_1</item>
<item name="mf_pager_recycler_view_divide_margin_left">0dp</item>
<item name="mf_pager_recycler_view_divide_margin_right">0dp</item>
</style>

Customize the style of message forward items#

To customize the style of forward items, change the UIKit-defined style values in the res/values/themes.xml file. The table below shows the style of message forward items you can customize. You need to keep the original names of the items and parents defined by the UIKit during the process.

<style name="Custom" parent="MirrorFly">
<item name="mf_contact_preview_style">@style/custom</item>
</style>
<style name="custom" parent="Widget.MirrorFly.UserPreview">
<item name="android:background"></item>
<item name="mf_contact_preview_nickname_appearance"></item>
</style>

List of attributes of Widget.MirrorFly.UserPreview#

AttributeResource typeDescription
android:backgrounddrawable/colorThe user item background.
mf_user_preview_nickname_appearancetext appearanceSize, color, font, and style of the user nickname.

Note : To apply the declared custom styles, pass the R.style.Custom to the ForwardMessageFragment.Builder as follows:

ForwardMessageFragment.Builder(R.style.Custom)
.setUseHeader(true)
.setHeaderTitle("Custom Forward")
.setUseHeaderLeftButton(true)
.build()