PreferencesView.java :  » Map » mappr » org » univie » mappr » Android Open Source

Android Open Source » Map » mappr 
mappr » org » univie » mappr » PreferencesView.java
package org.univie.mappr;

import android.os.Bundle;
import android.preference.EditTextPreference;
import android.preference.PreferenceActivity;
import android.text.method.DigitsKeyListener;

public class PreferencesView extends PreferenceActivity {
  
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    addPreferencesFromResource(R.xml.mappr_preferences);
    
    // set the map items preference to accept only digits
    EditTextPreference mapItems = (EditTextPreference) findPreference("preferences_categories_maps_items");
    mapItems.getEditText().setKeyListener(DigitsKeyListener.getInstance());
  }
}
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.