StepLengthPreference.java :  » App » no-pain-no-game » edu » ucla » cs » nopainnogame » preferences » Android Open Source

Android Open Source » App » no pain no game 
no pain no game » edu » ucla » cs » nopainnogame » preferences » StepLengthPreference.java
/*
 *  Pedometer - Android App
 *  Copyright (C) 2009 Levente Bagi
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package edu.ucla.cs.nopainnogame.preferences;

import edu.ucla.cs.nopainnogame.R;
import android.content.Context;
import android.preference.EditTextPreference;
import android.util.AttributeSet;

/**
 * An {@link EditTextPreference} that only allows float values.
 * @author Levente Bagi
 */
public class StepLengthPreference extends EditMeasurementPreference {

  public StepLengthPreference(Context context) {
    super(context);
  }
  public StepLengthPreference(Context context, AttributeSet attr) {
    super(context, attr);
  }
  public StepLengthPreference(Context context, AttributeSet attr, int defStyle) {
    super(context, attr, defStyle);
  }

  protected void initPreferenceDetails() {
    mTitleResource = R.string.step_length_setting_title;
    mMetricUnitsResource = R.string.centimeters;
    mImperialUnitsResource = R.string.inches;
  }
}

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.