Open UmerTaptap opened 2 weeks ago
Dear @UmerTaptap ,
Thank you for reaching out about the error you're encountering with the ChatController code snippet.
The error "Unresolved reference: chat_container" typically occurs when the layout resource ID R.id.chat_container
is not defined in your layout XML file.
To fix this, you need to ensure that you have a container view in your layout with the ID "chat_container". Here are the steps to resolve this:
<FrameLayout
android:id="@+id/chat_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
Don't hesitate to use our forums for your future questions.
ChatController.Builder(context).build(account, object : ChatLoadedListener { override fun onComplete(result: ChatLoadResponse) { result.error?.let { // report Chat loading failed } ?: let { // add result.fragment to your activity. supportFragmentManager.beginTransaction().replace(R.id.chat_container, result.fragment, tag).commit() } } })
I just copied this code snippet, getting error in " supportFragmentManager.beginTransaction().replace(R.id.chat_container, result.fragment, tag).commit()" line, saying "Unresolved reference: chat_container". What i should do?