0

So I just learned how to publish my own library (just some utility functions) through Github and JitPack, here is my code:

https://github.com/xht418/Util-Kotlin/tree/main/utlikotlin/src/main/java/com/example/utlikotlin

My problem is, the Double.roundDecimal() is recognized, but my custom DataBinding attribute isAddCase is not recognized, shows AAPT: error: attribute isAddCase (aka com.example.shapeableimageviewtest:isAddCase) not found.

I've tried in a new project:

<layout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>
        <variable
            name="name"
            type="String" />

    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:orientation="vertical">

        <EditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@{name}"
            app:isAddCase="true"/>    //either "isAddCase" or "app:isAddCase", doesn't work

    </LinearLayout>

</layout>

1 Answer 1

1

You have to change app:isAddCase=true with app:isAddCase="@{true}"

Sign up to request clarification or add additional context in comments.

1 Comment

You're amazing!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.