Example usage for android.widget SeekBar equals

List of usage examples for android.widget SeekBar equals

Introduction

In this page you can find the example usage for android.widget SeekBar equals.

Prototype

public boolean equals(Object obj) 

Source Link

Document

Indicates whether some other object is "equal to" this one.

Usage

From source file:com.andreadec.musicplayer.MainActivity.java

@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
    if (fromUser) { // Event is triggered only if the seekbar position was modified by the user
        if (seekBar.equals(seekBar1)) {
            musicService.seekTo(progress);
        } else if (seekBar.equals(seekBar2)) {
            int progress2 = (seekBar1.getProgress() / Constants.SECOND_SEEKBAR_DURATION)
                    * Constants.SECOND_SEEKBAR_DURATION;
            musicService.seekTo(progress2 + progress);
        }/*from   w w  w  . j  a va 2s .c o  m*/
        updatePosition();
    }
}