In my extended PreferenceActivity class I call addPreferencesFromResource(R.xml.livewallpaper_settings) so I have a xml file in which I define everything. How can I define a dialogue that asks the user to set a percentage? Maybe I could limit EditTextPreference to only accept values from 0-100?
In my extended PreferenceActivity class I call addPreferencesFromResource(R.xml.livewallpaper_settings) so I have a xml file
Share
You may have to handle this in code, not in XML.
EditTextof theEditTextPreferenceusinggetEditText().InputFilteron it usingsetFilters()filter()method of theInputFilter.