Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
对于锁定/解锁系统,我使用onStartTrackingTouchandonStopTrackingTouch方法。和测试,我不明白一件事:
onStartTrackingTouch
onStopTrackingTouch
public void onStartTrackingTouch(SeekBar seekBar) { Log.d(TAG,"Progress: "+seekBar.getProgress()); }
第一个值始终为零。
为什么?我需要真正的价值!
有谁能够帮助我?
提前致谢。
我改变了主意,最后我使用了onProgressChanged:
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if(progress>95){ seekBar.setVisibility(SeekBar.INVISIBLE); //code } public void onStopTrackingTouch(SeekBar seekBar) { seekBar.setProgress(0); }
谢谢