Code example for SeekBar

Methods: setOnSeekBarChangeListener

0
	private SeekBar.OnSeekBarChangeListener listener;
	private Transcript transcript;
	 
	@Before 
	public void setup() { 
	    seekBar = new SeekBar(new Activity());
        shadow = Robolectric.shadowOf(seekBar);
        listener = new TestSeekBarChangedListener();
        transcript = new Transcript();
        seekBar.setOnSeekBarChangeListener(listener);	
	} 
	 
    @Test 
    public void testOnSeekBarChangedListener() { 
        assertThat(shadow.getOnSeekBarChangeListener(), sameInstance(listener));
        seekBar.setOnSeekBarChangeListener(null);
        assertThat(shadow.getOnSeekBarChangeListener(), nullValue());
    } 
 
    @Test 
    public void testOnChangeNotification() {