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

Setting a custom background does not work #8

Open
shiladitya-bits opened this issue Dec 27, 2015 · 3 comments
Open

Setting a custom background does not work #8

shiladitya-bits opened this issue Dec 27, 2015 · 3 comments

Comments

@shiladitya-bits
Copy link

I tried doing this:

<com.dd.morphingbutton.MorphingButton
            android:id="@+id/buttonSend"
            style="?android:attr/borderlessButtonStyle"
            android:background="@drawable/transact_button_send"
            android:layout_width="?android:attr/actionBarSize"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:textColor="@color/white"
            android:text="SEND" />

The background still stays the default blue. What is the reason for this?

@shiladitya-bits
Copy link
Author

I saw the initView() method in https://github.com/dmytrodanylyk/android-morphing-button/blob/master/library/src/main/java/com/dd/morphingbutton/MorphingButton.java

The corner radius and background drawables are hardcoded.

@OmarBizreh
Copy link

I have changed them in the code but somehow I still see the same color, @shiladitya-bits did changing them from the code work for you?

@shiladitya-bits
Copy link
Author

Nope. I ended up not using this library, and made my own set of animations for getting a morph effect.

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

2 participants