ChatView

ChatView

open class ChatView

This view will load and display a chat component. To use chat view <com.livelike.sdk.chat.ChatView android:id="@+id/chatView" android:layout_width="wrap_content" android:layout_height="wrap_content"> </com.livelike.sdk.chat.ChatView>

Fields

Name Description
var isChatInputVisible: Boolean

use this variable to hide message input to build use case like influencer chat

var allowMediaFromKeyboard: Boolean
var emptyChatBackgroundView: View?
var displayUserProfile: Boolean

Boolean option to enable / disable the profile display inside chat view

val callback: MultiCallback(true)
var sentMessageListener: (LiveLikeChatMessage)->Unit

use this to listen messages sent from this view

Constructors

<init>

constructor(context: Context, attrs: AttributeSet?)

This view will load and display a chat component. To use chat view <com.livelike.sdk.chat.ChatView android:id="@+id/chatView" android:layout_width="wrap_content" android:layout_height="wrap_content"> </com.livelike.sdk.chat.ChatView>

Parameters

Name Description
context: Context
attrs: AttributeSet?

Methods

formatMessageDateTime

open fun formatMessageDateTime(messageTimeStamp: Long?): String

unix timestamp is passed as param returns the formatted string to display

Parameters

Name Description
messageTimeStamp: Long?

ReturnValue

Name Description
String

setSession

fun setSession(session: LiveLikeChatSession)

Parameters

Name Description
session: LiveLikeChatSession

ReturnValue

Name Description
Unit

onViewRemoved

open fun onViewRemoved(view: View?)

Parameters

Name Description
view: View?

ReturnValue

Name Description
Unit

onMeasure

open fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)

Parameters

Name Description
widthMeasureSpec: Int
heightMeasureSpec: Int

ReturnValue

Name Description
Unit

dispatchTouchEvent

open fun dispatchTouchEvent(ev: MotionEvent?): Boolean

Parameters

Name Description
ev: MotionEvent?

ReturnValue

Name Description
Boolean

dismissKeyboard

fun dismissKeyboard()

Use this function to hide any soft and sticker keyboards over the view.

ReturnValue

Name Description
Unit

onAttachedToWindow

open fun onAttachedToWindow()

ReturnValue

Name Description
Unit

onDetachedFromWindow

open fun onDetachedFromWindow()

ReturnValue

Name Description
Unit

CompanionObject

ChatView

open class ChatView

This view will load and display a chat component. To use chat view <com.livelike.sdk.chat.ChatView android:id="@+id/chatView" android:layout_width="wrap_content" android:layout_height="wrap_content"> </com.livelike.sdk.chat.ChatView>

Fields

Name Description
const SNAP_TO_LIVE_ANIMATION_DURATION: Float
const SNAP_TO_LIVE_ALPHA_ANIMATION_DURATION: Float
const SNAP_TO_LIVE_ANIMATION_DESTINATION: Int