Closed octasync closed 1 week ago
Hi @quadrowsx and sorry for the late reply, I was quite busy last couple of days ^^"
The ChatActivity
is completely transparent/translucent but a dim is applied to show the calling activity behind to mimic a BottomSheet behavior as you could have implemented in your own app.
Here is the theme applied to it:
<style name="CrispTheme.NoActionBar" parent="Theme.Material3.DayNight.NoActionBar">
<item name="android:backgroundDimEnabled">true</item> <!-- to apply the dim effect -->
<item name="android:navigationBarColor">?attr/colorSurface</item> <!-- the same as the BottomSheet background -->
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">true</item> <!-- to be compatible with the BottomSheet background -->
<!-- and to see the calling activity through -->
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsTranslucent">true</item>
</style>
In a sample app with a minimalist Theme, all is working
values/styles.xml
<style name="AppTheme" parent="Theme.Material3.DayNight">
<!-- colorSurface is kinda white -->
<item name="colorPrimary">?attr/colorSurface</item> <!-- used for ActionBar -->
<item name="colorPrimaryDark">?attr/colorSurface</item> <!-- used for status bar -->
<item name="android:windowLightStatusBar" tools:targetApi="m">true</item>
</style>
values-night/styles.xml
<style name="AppTheme" parent="Theme.Material3.DayNight">
<!-- colorSurface is kinda black -->
<item name="colorPrimary">?attr/colorSurface</item>
<item name="colorPrimaryDark">?attr/colorSurface</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">false</item>
</style>
And here is a capture
https://github.com/crisp-im/crisp-sdk-android/assets/2175246/0e3075a1-6ede-40c2-8748-df04076ab41d
However, if you have tested on an emulator, I suggests you to update Android Studio and SDK as the dimming effect was not well working on API 34 emulators, see Google issue tracker - Dialogs of API 34 emulator have no dimmed background .
Hope this will help you.
The
ChatActivity
is completely transparent/translucent but a dim is applied to show the calling activity behind to mimic a BottomSheet behavior as you could have implemented in your own app.
This is in reference to the Android Chatbox SDK, which can be integrated into an Android app in a few lines of code. The SDK is native and looks identical to the Web-based chatbox.
Hi @octasync, is the solution I have provided you months ago fixed your issue?
I close the issue as it is stale, I let you reopen it if needed ;)
Api 34 Screenshot:
Api 29 Screenshot:
![image](https://github.com/crisp-im/crisp-sdk-android/assets/63095166/d86e5db9-83f3-44a4-96f9-8dda1d1e9cb7)
Changing default style in manifest application block, nothing changed. Just check this bug, maybe i did something wrong. (Java+Xml)