Issue
I have an ImageButton
like this
<ImageButton
...
style="@style/buttonStyle" />
where buttonStyle
looks like this;
<style name="buttonStyle">
...
<item name="android:background">?attr/selectableItemBackgroundBorderless</item>
...
</style>
When this ImageButton
is displayed within Espresso tests, it throws
android.view.InflateException ... Error inflating class android.widget.ImageButton
When I remove android:background
attribute, it works fine.
Is there something I'm missing about Android resources on Espresso tests?
Solution
Please, try to use correct Context with corresponding theme.
Answered By - Bracadabra
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.