Android - MaterialComponents.DayNight

12 Comentarios

  • Eric Nelson
    Zendesk Developer Advocacy
    Hey Steven,

    Thanks for the feedback, which one of our Android SDK's are you using? 
    0
  • Steven JustEAT

    Hi Eric,

    Here's the current one:

    com.zendesk:chat:3.1.0
    com.zendesk:messaging:5.1.0

     

    I've also had a look at the latest version as per your latest recommendation:

    com.zendesk:chat:3.3.2
    com.zendesk:messaging:5.2.2

     

    But haven't found anything conclusive looking at either the layouts, the styles, the colours in these libraries.

    Thanks.

    0
  • Eric Nelson
    Zendesk Developer Advocacy
    Hey Steven,

    If you extend the material design theme into the SDK it should affect the downstream MessagingActivity as well. Is this not functioning as expected for you? 
    0
  • Steven JustEAT

    So yes I'm using the default Zendesk Theme but it's not inheriting the correct theme for Day/Night change (to make use of a more dynamic theming)

    The theme should be extending:

    Theme.MaterialComponents.DayNight

    instead of

    Theme.MaterialComponents.Light

    As a result, you can see in the screenshots below, switching from Day/Night (look at the status bard), the chat stays white.

     

    In any case that's fine, I can override the theme to be correct but then some views aren't giving the expected output as colors are "hardcoded". For example `zui_view_typing_indicator_content`. Here's the day/night version:

    So in a way, I'm wondering if there are any plans to fix these in a soon version, or if I basically have to override all the views to handle correctly the colors (don't really want to go that way as it'll increase the next upgrade to great lengths to double-check every color again).

     

    Thanks :)

    1
  • Diego Costa

    Hi Eric Nelson, I'm having issues with this too, the ZendeskSdkTheme should extend Theme.MaterialComponents.DayNight, and not Theme.MaterialComponents.Light

    Also, when trying to inherit from ZendeskSdkTheme.Dark, the resource is not there, unless I include

    implementation 'com.zendesk:support:5.0.5' dependency. 

    I was trying to migrate from v1 SDK, and the dependencies I have are

    implementation 'com.zendesk:chat:3.3.3'
    implementation 'com.zendesk:messaging:5.2.3'

    Is adding the dependency the correct step, or am I missing something?

     

    Thanks!

     

     

    0
  • Mike Trewartha

    We're also having issues with dark theming not taking effect for things like backgrounds. This is all made even more frustrating by the fact that Material 3 is now a thing, so we have to keep a MaterialComponents theme around for Zendesk. Proper Material 3 support would be fantastic, but a working Material 2 dark theme is needed in the mean time. Can you give us any updates or further help, Eric Nelson?

    0
  • Greg Katechis
    Zendesk Developer Advocacy
    Hi Mike! I'm not an Android expert, but I did see that one of our engineers recommended using the following to force dark mode on start. Could you give this a try and let us know if it works?
     
    AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
    0
  • Steven JustEAT

    Hi Greg Katechis,

    Thanks for your update. Although this won't solve the initial problem.

    The solution you're giving will force the whole app to go into dark/night mode, thus making us handling day/night manually rather than using the automatic feature from the Android platform itself.

    Furthermore, as mentionned above, the base Theme (ZendeskSdkTheme) used by the Livechat widget is not the correct one.

    The theme should be extending:

    Theme.MaterialComponents.DayNight

    instead of

    Theme.MaterialComponents.Light

    So because of the above, even in Night Mode, the Livechat still has "Light/Day" colors.

     

    As explained above, a change in the SDK needs to happen for us to benefit from the Android platform features, instead of handling things manually.

    If there's any updates or ETA on this, it would be great :).

    Thanks a lot.

    0
  • Greg Katechis
    Zendesk Developer Advocacy
    Got it, thanks for the explanation here! I'll loop in our SDK engineers and I'll let you know what they have to say.
    0
  • Steven JustEAT

    Hi Greg Katechis, hope you're going well! 
    Did you get around to talking with the SDK engineers? Have they got anything to say? :) 

    Thanks for your help! 

    0
  • Arsim Sejdiu

    Hello everyone,

    Experiencing the same problem here, I hope the team did fix the issue, and for future reference please update the documentation on how to customize the look on android because it is not clear .


    Here is an image explaining what I mean about the style that I want to change, same on dark mode.

    Thanks

    0
  • Greg Katechis
    Zendesk Developer Advocacy

    Apologies for the late response here. The response that we had from our dev team was that we do not support this customization and they published this update in our docs to relay that. I know that this may be a frustrating response and the best step that I can recommend would be to post feedback in our feedback forum so that without enough community support, the correct team can handle responses.

    I'm going to close this topic for comments at this time and refer anyone checking this to the feedback forum.

    0

La publicación no admite más comentarios.

Tecnología de Zendesk