-1

I'm trying to use this library

What should I replace app with?

   <com.devmarvel.creditcardentry.library.CreditCardForm
        android:id="@+id/credit_card_form"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:helper_text_color="@color/yellow_500"
        app:include_helper="false"
        app:include_zip="false"/>

I'm having this error when adding the xml:

enter image description here

user1872384
  • 6,886
  • 11
  • 61
  • 103
  • Nothing. Why do you think you have to replace it? – Tim Sep 17 '15 at 08:50
  • @TimCastelijns I've already read that link, but it didn't help me. That leads me to ask this question. – user1872384 Sep 17 '15 at 08:54
  • Then you need to rephrase your question. Go into more detail about what you really need – Tim Sep 17 '15 at 08:54
  • I've just added the error message above. – user1872384 Sep 17 '15 at 08:55
  • http://stackoverflow.com/questions/28353835/namespace-app-not-bound-in-android-studio-with-external-lib-from-maven – Tim Sep 17 '15 at 08:55
  • 4
    `xmlns:app="http://schemas.android.com/apk/res-auto"` put this in the parent layout, and you are good to go – Emil Sep 17 '15 at 08:56
  • Thanks. I've added that and the error is gone. But I'm still having issues when customising it "app:include_exp="false". Guess it's something else that causes the customisation failure. – user1872384 Sep 17 '15 at 08:58

1 Answers1

3

That is a namespace, usually used for applying custom attributes to custom views. As in your case, you have a custom view CreditCardForm which has it's own attributes.

Attributes are defined in the library inside res/attrs.xml

To resolve your error, add the line

xmlns:app="http://schemas.android.com/apk/res-auto"
Marko
  • 20,385
  • 13
  • 48
  • 64