Note that there are some explanatory texts on larger screens.

plurals
  1. POIs possible to start seekBar OnSeekBarChangeListener from other view( different than my seekBar)?
    primarykey
    data
    text
    <p>I have a SeekBar(seekBar1) on my layout with a small height (3dp). Because of it's small height is hard to select that view and I want to implement an other way to update the progress for my seek view. For to do that I think at something like that: I have to put an other bigger and invisible(<code>android:background = "#00000000"</code>) seekBar(seekBar2) under my small seekBar1, I set the <code>onSeekBarChangeListener</code> for seekBar2, and everytime when I touch the seekBar2 and <code>onSeekBarChange()</code> is called I will update the progress for seekBar1.</p> <p>I want to ask if is posible to do that in a better way?</p> <p>This is my code:</p> <pre><code>seekBarSecond.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { @Override public void onStopTrackingTouch(SeekBar seekBar) { try { musicService.seekTo(seekBar.getProgress()); seekBar.setProgress(seekBarSecond.getProgress()); } catch (RemoteException e) { e.printStackTrace(); } } @Override public void onStartTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub } @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { } }); seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener(){ public void onStopTrackingTouch(SeekBar seekBar) { try { musicService.seekTo(seekBar.getProgress()); } catch (RemoteException e) { e.printStackTrace(); } } public void onStartTrackingTouch(SeekBar seekBar){ } public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser){ } }); </code></pre> <p>Thank you!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload