title: onProgressChanged() of a SeekBar is called twice
body: <p>I have created a Custom <code>SeekBarPreference</code> such that it displays a range of time to be selected from (say <code>0.2</code> sec to <code>2.2</code> sec). My problem is onProgressChanged() is called twice - once with <code>progress = 0</code> and the second time with <code>progress = "actual value"</code>. I am storing the value in a <code>SharedPreference</code> so that I can use it later in my application. <br/>Here is my code snippet - <br/></p>
  
  <pre><code>@Override
  protected View onCreateDialogView() {
      LayoutInflater inflator = ((PreferenceActivity) mContext)
              .getLayoutInflater();
      View view = inflator.inflate(R.layout.seek_bar, null);
  
      mCurrentValue = PreferenceManager.getDefaultSharedPreferences(mContext)
              .getFloat(this.getKey(), mDefaultValue);
      ......
      SeekBar mSeekBar = (SeekBar) view.findViewById(R.id.seekbar);
      mSeekBar.setOnSeekBarChangeListener(this);
  
      mSeekBar.setMax(20);
      mSeekBar.setProgress((int) ((mCurrentValue - mMinValue)
              / (mMaxValue - mMinValue) * 20)); // 20 = progress bar max value.
      return view;
  }
  
  @Override
  public void onProgressChanged(SeekBar seekBar, int progress,
          boolean fromUser) {
      if (progress != 0) {
          mCurrentValue = (float) ((float) progress / 20
                  * (mMaxValue - mMinValue) + mMinValue);
      }
      mValueText.setText(Float.toString(mCurrentValue)); 
      /* mValueText is a TextBox where I display my Current Value */
  }
  </code></pre>
  
  <p>Here, I have checked the value of progress such that it is <code>not equal to 0</code> and hence it avoids the first call. However, the side-effect of this is that I am not able to set anything to <code>0</code>. <br/> <br/>
  What can be the work around for this?</p>