MyPureCloud / mobiledx-samples-android

Mobile DX samples for android
MIT License
2 stars 1 forks source link

R.id.chat_container NOT FOUND! #102

Open UmerTaptap opened 2 weeks ago

UmerTaptap commented 2 weeks ago

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?

mobichel commented 1 week 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:

Don't hesitate to use our forums for your future questions.