ErrorView
ErrorView copied to clipboard
Failed to find style
Good day, thx for library.
I have issue on rendering view in android studio editor.
Failed to find style 'ev_style' in current theme
Hello, did you try Rebuilding your project?
Closing due to inactivity.
Same issue:
fragment layout with a surrounding relative layout:
<tr.xip.errorview.ErrorView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/error_view"
android:visibility="gone"
android:layout_centerInParent="true" />
style(the second one is used in the activity:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.NoActionBar" parent="AppTheme">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
Hey! Is the view still rendered or does the error message actually break it? Did you rebuild your project?
While I should definitely look into getting rid of that error message, you should be able to apply the following as a quick fix:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="ev_style">@style/MyErrorView</item>
</style>
<style name="MyErrorView">
<!-- can be empty if you aren't styling anything -->
</style>
Is the view still rendered?
No
But thanks for the quick fix!