八, SeekBar 音频播放拖拽进度条 > android:progress="40" 第一进度 android:secondaryProgress="50" 第二进度 >使用: setOnSeekBarChangeListener package com.fmy.a;import android.app.Activity;import android.os.Bundle;import android.view.View;import android.view.View.OnClickListener;import android.widget.SeekBar;import android.widget.SeekBar.OnSeekBarChangeListener;import android.widget.Toast;public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.demo_textview); SeekBar sb = (SeekBar) findViewById(R.id.sb); //用户点击不会触发此回调接口 sb.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Toast.makeText(MainActivity.this, "嘿嘿", 0).show(); } }); sb.setOnSeekBarChangeListener(new OnSeekBarChangeListener() { //停止拖动音频条 @Override public void onStopTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub System.out.println("停止拖动"); } //开发拖动音频条 @Override public void onStartTrackingTouch(SeekBar seekBar) { // TODO Auto-generated method stub System.out.println("开始拖动音频条"); } //音频条改变 fromUser是否是用户改变的状态 progress 当前进度 @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { // TODO Auto-generated method stub System.out.println("音频条改变"+fromUser); } }); } }