apptentive / apptentive-android

Apptentive Android SDK
http://www.apptentive.com
BSD 3-Clause "New" or "Revised" License
65 stars 64 forks source link

About Dialog does not allow setting theme properly for buttons #198

Closed simonsickle closed 3 years ago

simonsickle commented 4 years ago

https://github.com/apptentive/apptentive-android/blob/master/apptentive/src/main/res/layout/apptentive_about.xml#L75-L89

As a developer, I expect to be able to use the material components theme. When using this theme, however, the borderless buttons have a rounded tint to them. The text color is the same as the tint color, making the text impossible to read, as well. Screen Shot 2020-03-06 at 11 52 20 AM

CaseyApptentive commented 4 years ago

Hi @sicklepilot. Thanks for this report as well. It looks like you're seeing this when you hit the "(i)" info button within Message Center -- is that right?

Let me know if that's the only place you're seeing this because we may be able to actually help you remove that button altogether, if that frees you up.

simonsickle commented 4 years ago

That’s correct, removing that info button would solve our issue! All other text buttons are properly setting the style as expected (namely, the Satisfaction Dialog) if I override the buttons them in the override style. I did have to use a parent theme of MaterialComponent TextButton to get that functional, if anyone else is struggling with this.

CaseyApptentive commented 4 years ago

This is likely not the best long term solution, but it is possible to hide that "(i)" button. Would that free you up here?

To do this, you do not necessarily need to update to a specific version of the SDK. Rather, you'd need to override the theme res/values/themes-apptentive-override.xml. This will hide the (i) button in both Message Center and Surveys.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Apptentive.Style.Widget.ImageButton.Info">
        <item name="android:visibility">invisible</item>
    </style>
</resources>

Let me know if that works for this particular issue.

simonsickle commented 3 years ago

That workaround does the trick. Furthermore, setting our core theme as the parent of the apptentive override gets most of the functionality we wanted to feel like it is part of the app.