Skip to content

Commit bd816fd

Browse files
committed
remove animation callbacks from SparkEventListener
1 parent 27276b3 commit bd816fd

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

sparkbutton/src/main/java/at/connyduck/sparkbutton/SparkButton.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,10 @@ public void onAnimationCancel(Animator animation) {
183183

184184
@Override
185185
public void onAnimationEnd(Animator animation) {
186-
if (listener != null) {
187-
listener.onEventAnimationEnd(imageView,isChecked);
188-
}
189186
}
190187

191188
@Override
192189
public void onAnimationStart(Animator animation) {
193-
if (listener != null) {
194-
listener.onEventAnimationStart(imageView,isChecked);
195-
}
196190
}
197191
});
198192

@@ -278,7 +272,7 @@ public void onClick(View v) {
278272
playAnimation();
279273
}
280274
if (listener != null) {
281-
listener.onEvent(imageView, isChecked);
275+
listener.onEvent(this, isChecked);
282276
}
283277
}
284278

sparkbutton/src/main/java/at/connyduck/sparkbutton/SparkEventListener.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
package at.connyduck.sparkbutton;
1616

17-
import android.widget.ImageView;
18-
1917
public interface SparkEventListener {
20-
void onEvent(ImageView button, boolean buttonState);
21-
void onEventAnimationEnd(ImageView button,boolean buttonState);
22-
void onEventAnimationStart(ImageView button,boolean buttonState);
18+
void onEvent(SparkButton button, boolean buttonState);
2319
}

0 commit comments

Comments
 (0)