AnimatedCircleLoadingView
AnimatedCircleLoadingView copied to clipboard
Colors not found; can not compile
I have added the layout like in your example:
<com.github.jlmd.animatedcircleloadingview.AnimatedCircleLoadingView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/circle_loading_view"
android:layout_width="250dp"
android:layout_height="250dp"
android:background="@color/background"
android:layout_centerInParent="true"
app:animCircleLoadingView_mainColor="@color/main_color"
app:animCircleLoadingView_secondaryColor="@color/secondary_color"
app:animCircleLoadingView_textColor="@android:color/white"
/>
Additionaly I added the colors to my color.xml file:
<resources>
<color name="background">#65828e</color>
<color name="main_color">#ff9a00</color>
<color name="secondary_color">#BDBDBD</color>
</resources>
Error: It can't find mainColor, secondaryColor and textColor.
I am also facing the same issue, any suggestions how to remove this error?
Same issue here but works when cloning directly from repo, that should give me a clue but can't seem to remove this error.
I found a workaround. Create a new XML file named attrs inside values folder in the resources directory with following code:
`
<declare-styleable name="AnimatedCircleLoadingView">
<attr name="animCircleLoadingView_mainColor" format="color" localization="suggested" />
<attr name="animCircleLoadingView_secondaryColor" format="color" localization="suggested" />
<attr name="animCircleLoadingView_checkMarkTintColor" format="color" localization="suggested" />
<attr name="animCircleLoadingView_failureMarkTintColor" format="color" localization="suggested" />
<attr name="animCircleLoadingView_textColor" format="color" localization="suggested" />
</declare-styleable>
`
@gabrielkdc Can you please share full code? How are you using this XML file that you created?
Not required. I just created the XML and things started working. Thanks @gabrielkdc