I have been using Digits in my Android production app for few months now without any issues. Recently Digits was upgraded to version 2.0.0. I tried upgrading my implementation for the same by following Digits upgrade guide. Everything is working as expected but theme.
My implementation:
In my app, in the activity which extends Application
, I have initialized digits as given in docs, and post that used the following code to set theme:
new Digits.Builder().withTheme(R.style.CustomDigitsTheme).build();
where CustomDigitsTheme
is:
<style name="CustomDigitsTheme" parent="Theme.AppCompat.Light">
<item name="android:textColorPrimary">@color/text_primary</item>
<item name="android:textColorSecondary">@color/text_hint</item>
<item name="android:textColorLink">@color/accent</item>
<item name="dgts__accentColor">@color/accent</item>
<item name="dgts__logoDrawable">@drawable/logo</item>
</style>
Note that Digits provide another way to set theme (using DigitsAuthButton
). But I can't use it because in my implementation I'm using regular Button
.
Solved.
Silly to put this code:
new Digits.Builder().withTheme(R.style.CustomDigitsTheme).build();
instead of:
Fabric.with(this, new TwitterCore(twitterAuthConfig), new Digits.Builder().withTheme(R.style.CustomDigitsTheme).build());