Skip to content

java.lang.NullPointerException #11

Description

@arunavo4

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions