LikeAnimation icon indicating copy to clipboard operation
LikeAnimation copied to clipboard

java.lang.NullPointerException

Open arunavo4 opened this issue 8 years ago • 0 comments

java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewPropertyAnimator android.widget.ImageView.animate()' on a null object reference at com.frogermcs.io.likeanimation.LikeButtonView.onTouchEvent(LikeButtonView.java:138)

Which is this line: ivStar.animate().scaleX(0.7f).scaleY(0.7f).setDuration(150).setInterpolator(DECCELERATE_INTERPOLATOR);

I did change some sizes in width and height:

<com.frogermcs.io.likeanimation.DotsView
    android:id="@+id/vDotsView"
    android:layout_width="30dp"
    android:layout_height="30dp"
    android:layout_gravity="center"/>

<com.frogermcs.io.likeanimation.CircleView
    android:id="@+id/vCircle"
    android:layout_width="12dp"
    android:layout_height="12dp"
    android:layout_gravity="center"/>

<ImageView
    android:id="@+id/ivStar"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    app:srcCompat="@drawable/ic_star_rate_off"/>

and in

    <com.frogermcs.io.likeanimation.LikeButtonView
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_marginEnd="10dp"
        android:layout_alignRight="@+id/container_view"
        android:layout_centerVertical="true"/>

Any idea on what is wrong, i didnt change anything else

arunavo4 avatar Sep 03 '17 17:09 arunavo4