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

In fragment don't work the explosion in the icon #24

Open
salveta opened this issue Mar 10, 2017 · 1 comment
Open

In fragment don't work the explosion in the icon #24

salveta opened this issue Mar 10, 2017 · 1 comment

Comments

@salveta
Copy link

salveta commented Mar 10, 2017

Hi,

I'm trying to implement the library. The icon change the color and do the effect of the moviment, but is not working inside a fragment. If I copy the same code in an activity, it is working fine.

Have the library a problem working in a fragment?

Fragment code:
@OverRide
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);

    shineButton = (ShineButton) getView().findViewById(R.id.po_image0);
    shineButton.init((HomeActivity)getActivity());

    shineButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
        }
    });

}

XML code:
<com.sackcentury.shinebuttonlib.ShineButton
android:id="@+id/po_image0"
android:layout_width="18dp"
android:layout_height="18dp"
app:btn_color="@color/colorGrey"
app:btn_fill_color="#f26d7d"
app:siShape="@raw/ico_social_like"
android:layout_marginTop="@dimen/margin_10"
android:layout_marginLeft="@dimen/margin_20"
android:layout_marginStart="@dimen/margin_20"
android:elevation="10dp"/>

@ChadCSong
Copy link
Owner

I just update a fragment example https://github.com/ChadCSong/ShineButton/blob/master/app/src/main/java/com/sackcentury/shinebutton/FragmentDemo.java
I haven't replication your problem.

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

No branches or pull requests

2 participants