All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robolectric.shadows.ShadowSeekBar Maven / Gradle / Ivy

package org.robolectric.shadows;

import android.widget.SeekBar;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
import org.robolectric.internal.Shadow;

/**
 * Shadow for {@link android.widget.SeekBar}.
 */
@Implements(SeekBar.class)
public class ShadowSeekBar extends ShadowAbsSeekBar {

  @RealObject
  private SeekBar realSeekBar;

  private SeekBar.OnSeekBarChangeListener listener;

  @Implementation
  public void setOnSeekBarChangeListener(SeekBar.OnSeekBarChangeListener listener) {
    this.listener = listener;
    Shadow.directlyOn(realSeekBar, SeekBar.class).setOnSeekBarChangeListener(listener);
  }

  public SeekBar.OnSeekBarChangeListener getOnSeekBarChangeListener() {
    return this.listener;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy