File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
sparkbutton/src/main/java/at/connyduck/sparkbutton Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1414
1515package at .connyduck .sparkbutton ;
1616
17- import android .widget .ImageView ;
18-
1917public 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}
You can’t perform that action at this time.
0 commit comments