Kemi Kuti
Kemi Kuti

Reputation: 1

AAPT: error: attribute buttonColor (aka com.example.*appName*) not found

I have searched far and high for a solution and tried to also understand this error but there seems not to be much info about this particular error.

Here is the activity.xml line where is saying the error is residing (I have two of these as I have two buttons)

<info.hoang8f.widget.FButton
            android:id="@+id/btnMakeAnAccount"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:layout_margin="8dp"
            android:text="Make An Account"
            android:textColor="@color/pink"
            fbutton:buttonColor="@color/black"
            fbutton:cornerRadius="4dp"
            fbutton:shadowColor="@android:color/black"
            fbutton:shadowEnabled="true"
            fbutton:shadowHeight="5dp"
            />

at first I was using this library --> implementation 'info.hoang8f:fbutton:1.0.5'

however due to my emulator not working I came to learn to use this library instead --> implementation 'com.github.jd-alexander:android-flat-button:v1.1' the library details of use is found here https://github.com/jd-alexander/android-flat-button I thought in my code I have adapted it so it could work but obviously not lol

this is the code of me casting the button and its methods in my main btnLogin = (FButton)findViewById(R.id.btnLogin); btnMakeAnAccount = (FButton)findViewById(R.id.btnMakeAnAccount);

    btnLogin.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    });

    btnMakeAnAccount.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

        }
    });

Upvotes: 0

Views: 1362

Answers (2)

Ardita Krasniqi
Ardita Krasniqi

Reputation: 1

In xml, instead of fbutton:buttonColor use fbutton:fButtonColor

fbutton:fButtonColor="@color/black"

Upvotes: 0

Kamal Nayan
Kamal Nayan

Reputation: 1718

Try to remove button colour and use some another attribute like background color or something else.

Upvotes: 1

Related Questions