Closed ArtyomVoronov closed 6 years ago
Our example is using AppCompat, look at https://raw.githubusercontent.com/crisp-im/crisp-sdk-android/master/example/src/main/java/crisp/im/example/MainActivity.java
I think it's something else.
It works perfectly if you place CrispFragment inside activity. To reproduce it try to use CrispFragment inside fragment inside AppCompatActivity. I'll show sample code tomorrow.
The example just above is using an AppCompatActivity
Yes, and your example works correctly. The problem reproduces using CrispFragment inside nested fragments inside an AppCompatActivity.
You can still inflate manually Note:
You cannot inflate a layout into a fragment when that layout includes a
. Nested fragments are only supported when added to a fragment dynamically.
And how to add that to a fragment dynamically?
It's impossible to use CrispFragment inside AppCompat fragments. Returning to a fragment with CrispFragment inside I have "Duplicate ID, tag null, or parent id with another fragment" error. Few workarounds exist and all of them require CrispFragment inheritance from android.support.v4.app.Fragment. For example, https://stackoverflow.com/a/19815266/4589148
Do you plan to implement CrispFragment for AppCompat?