"AndroidSeekBarPreference" is an Android-library, which provides a Preference implementation, which allows to choose a floating point value or an integer value from a continuous range via a SeekBar. When interacting with the preference the SeekBar is shown within a dialog. The chosen value will only be persisted, if confirmed by the user.
An Android test project, which provides JUnit tests for this library, is available via the URL https://sourceforge.net/p/androidseekbarpreferencetest.
An Android app, which implements a use case, using this library, can be found via the internet address https://sourceforge.net/p/androidseekbarpreferencesample.
A "Material Design"-styled variant of this library is part of the library "AndroidMaterialPreferences", which can be found here: https://sourceforge.net/p/androidmaterialpreferences
Features
- Provides a Preference implementation, which allows to choose a floating point value or an integer value from a continuous range via a SeekBar
- The number of decimals of the floating point values, the Preference allows to choose can be adjusted. When setting the number of decimals to 0, the Preference does only allow to choose integer values.
- The range, respectively the minimum and maximum value, the Preference allows to choose a value from, can be adjusted.
- The dialog, which is shown to the user to choose a value via the SeekBar, can be configured to display a customized message.
- The value, which has been chosen via the SeekBar will not be persisted until the user affirmativly closes the dialog. The user also has the possibility to close the dialog, without persisting the chosen value.
- It is possible to define a step size, the value is increased or decreased by, when the SeekBar is moved by the user.
- The displaying of the currently chosen value can be adjusted to be suffixed by an unit and to use a specific symbol to separate floating point numbers.
- Multiple texts, which are shown as the preferences summary, depending on the value, which is currently chosen, can be set. Alternatively it is possible to show the currently chosen value as the preference's summary.
- The Preference is visually-consistent with Android's built-in preferences.