1 package org.robolectric.shadows;
2 
3 import android.widget.SeekBar;
4 import org.robolectric.annotation.Implementation;
5 import org.robolectric.annotation.Implements;
6 import org.robolectric.annotation.RealObject;
7 import org.robolectric.shadow.api.Shadow;
8 
9 @Implements(SeekBar.class)
10 public class ShadowSeekBar extends ShadowAbsSeekBar {
11 
12   @RealObject
13   private SeekBar realSeekBar;
14 
15   private SeekBar.OnSeekBarChangeListener listener;
16 
17   @Implementation
setOnSeekBarChangeListener(SeekBar.OnSeekBarChangeListener listener)18   protected void setOnSeekBarChangeListener(SeekBar.OnSeekBarChangeListener listener) {
19     this.listener = listener;
20     Shadow.directlyOn(realSeekBar, SeekBar.class).setOnSeekBarChangeListener(listener);
21   }
22 
getOnSeekBarChangeListener()23   public SeekBar.OnSeekBarChangeListener getOnSeekBarChangeListener() {
24     return this.listener;
25   }
26 }
27