ErrorView icon indicating copy to clipboard operation
ErrorView copied to clipboard

Failed to find style

Open AlexeyKorshun opened this issue 8 years ago • 5 comments
trafficstars

Good day, thx for library.

I have issue on rendering view in android studio editor.

Failed to find style 'ev_style' in current theme

AlexeyKorshun avatar Jan 21 '17 14:01 AlexeyKorshun

Hello, did you try Rebuilding your project?

xiprox avatar Jan 21 '17 16:01 xiprox

Closing due to inactivity.

xiprox avatar Jul 13 '17 15:07 xiprox

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>

randombyte-developer avatar Oct 24 '17 17:10 randombyte-developer

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>

xiprox avatar Oct 24 '17 17:10 xiprox

Is the view still rendered?

No

But thanks for the quick fix!

randombyte-developer avatar Oct 24 '17 19:10 randombyte-developer