@Override
 protected void onBindDialogView(View view) {
   super.onBindDialogView(view);
   mPicker = (NumberPicker) view.findViewById(R.id.pref_num_picker);
   mPicker.setRange(mStartRange, mEndRange);
   mPicker.setCurrent(getValue());
 }
 public void setRange(int start, int end) {
   mPicker.setRange(start, end);
 }