Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors not found; can not compile #31

Open
Sub-Zero-1 opened this issue Sep 27, 2018 · 5 comments
Open

Colors not found; can not compile #31

Sub-Zero-1 opened this issue Sep 27, 2018 · 5 comments

Comments

@Sub-Zero-1
Copy link

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.

@harshmalik
Copy link

I am also facing the same issue, any suggestions how to remove this error?

@mlu-linkin
Copy link

Same issue here but works when cloning directly from repo, that should give me a clue but can't seem to remove this error.

@gabrielkdc
Copy link

gabrielkdc commented Oct 10, 2018

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>

`

@apexkid
Copy link

apexkid commented Dec 2, 2018

@gabrielkdc Can you please share full code? How are you using this XML file that you created?

@apexkid
Copy link

apexkid commented Dec 2, 2018

Not required. I just created the XML and things started working. Thanks @gabrielkdc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants