Java Code Examples for android.preference.SwitchPreference#setOrder()
The following examples show how to use
android.preference.SwitchPreference#setOrder() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TwoStatePreferenceHelper.java From openboard with GNU General Public License v3.0 | 6 votes |
static void addSwitchPreferenceBasedOnCheckBoxPreference(final CheckBoxPreference checkBox, final PreferenceGroup group) { final SwitchPreference switchPref = new SwitchPreference(checkBox.getContext()); switchPref.setTitle(checkBox.getTitle()); switchPref.setKey(checkBox.getKey()); switchPref.setOrder(checkBox.getOrder()); switchPref.setPersistent(checkBox.isPersistent()); switchPref.setEnabled(checkBox.isEnabled()); switchPref.setChecked(checkBox.isChecked()); switchPref.setSummary(checkBox.getSummary()); switchPref.setSummaryOn(checkBox.getSummaryOn()); switchPref.setSummaryOff(checkBox.getSummaryOff()); switchPref.setSwitchTextOn(EMPTY_TEXT); switchPref.setSwitchTextOff(EMPTY_TEXT); group.addPreference(switchPref); switchPref.setDependency(checkBox.getDependency()); }
Example 2
Source File: TwoStatePreferenceHelper.java From Android-Keyboard with Apache License 2.0 | 6 votes |
static void addSwitchPreferenceBasedOnCheckBoxPreference(final CheckBoxPreference checkBox, final PreferenceGroup group) { final SwitchPreference switchPref = new SwitchPreference(checkBox.getContext()); switchPref.setTitle(checkBox.getTitle()); switchPref.setKey(checkBox.getKey()); switchPref.setOrder(checkBox.getOrder()); switchPref.setPersistent(checkBox.isPersistent()); switchPref.setEnabled(checkBox.isEnabled()); switchPref.setChecked(checkBox.isChecked()); switchPref.setSummary(checkBox.getSummary()); switchPref.setSummaryOn(checkBox.getSummaryOn()); switchPref.setSummaryOff(checkBox.getSummaryOff()); switchPref.setSwitchTextOn(EMPTY_TEXT); switchPref.setSwitchTextOff(EMPTY_TEXT); group.addPreference(switchPref); switchPref.setDependency(checkBox.getDependency()); }
Example 3
Source File: TwoStatePreferenceHelper.java From LokiBoard-Android-Keylogger with Apache License 2.0 | 6 votes |
static void addSwitchPreferenceBasedOnCheckBoxPreference(final CheckBoxPreference checkBox, final PreferenceGroup group) { final SwitchPreference switchPref = new SwitchPreference(checkBox.getContext()); switchPref.setTitle(checkBox.getTitle()); switchPref.setKey(checkBox.getKey()); switchPref.setOrder(checkBox.getOrder()); switchPref.setPersistent(checkBox.isPersistent()); switchPref.setEnabled(checkBox.isEnabled()); switchPref.setChecked(checkBox.isChecked()); switchPref.setSummary(checkBox.getSummary()); switchPref.setSummaryOn(checkBox.getSummaryOn()); switchPref.setSummaryOff(checkBox.getSummaryOff()); switchPref.setSwitchTextOn(EMPTY_TEXT); switchPref.setSwitchTextOff(EMPTY_TEXT); group.addPreference(switchPref); switchPref.setDependency(checkBox.getDependency()); }
Example 4
Source File: TwoStatePreferenceHelper.java From simple-keyboard with Apache License 2.0 | 6 votes |
static void addSwitchPreferenceBasedOnCheckBoxPreference(final CheckBoxPreference checkBox, final PreferenceGroup group) { final SwitchPreference switchPref = new SwitchPreference(checkBox.getContext()); switchPref.setTitle(checkBox.getTitle()); switchPref.setKey(checkBox.getKey()); switchPref.setOrder(checkBox.getOrder()); switchPref.setPersistent(checkBox.isPersistent()); switchPref.setEnabled(checkBox.isEnabled()); switchPref.setChecked(checkBox.isChecked()); switchPref.setSummary(checkBox.getSummary()); switchPref.setSummaryOn(checkBox.getSummaryOn()); switchPref.setSummaryOff(checkBox.getSummaryOff()); switchPref.setSwitchTextOn(EMPTY_TEXT); switchPref.setSwitchTextOff(EMPTY_TEXT); group.addPreference(switchPref); switchPref.setDependency(checkBox.getDependency()); }
Example 5
Source File: TwoStatePreferenceHelper.java From AOSP-Kayboard-7.1.2 with Apache License 2.0 | 6 votes |
static void addSwitchPreferenceBasedOnCheckBoxPreference(final CheckBoxPreference checkBox, final PreferenceGroup group) { final SwitchPreference switchPref = new SwitchPreference(checkBox.getContext()); switchPref.setTitle(checkBox.getTitle()); switchPref.setKey(checkBox.getKey()); switchPref.setOrder(checkBox.getOrder()); switchPref.setPersistent(checkBox.isPersistent()); switchPref.setEnabled(checkBox.isEnabled()); switchPref.setChecked(checkBox.isChecked()); switchPref.setSummary(checkBox.getSummary()); switchPref.setSummaryOn(checkBox.getSummaryOn()); switchPref.setSummaryOff(checkBox.getSummaryOff()); switchPref.setSwitchTextOn(EMPTY_TEXT); switchPref.setSwitchTextOff(EMPTY_TEXT); group.addPreference(switchPref); switchPref.setDependency(checkBox.getDependency()); }
Example 6
Source File: TwoStatePreferenceHelper.java From Indic-Keyboard with Apache License 2.0 | 6 votes |
static void addSwitchPreferenceBasedOnCheckBoxPreference(final CheckBoxPreference checkBox, final PreferenceGroup group) { final SwitchPreference switchPref = new SwitchPreference(checkBox.getContext()); switchPref.setTitle(checkBox.getTitle()); switchPref.setKey(checkBox.getKey()); switchPref.setOrder(checkBox.getOrder()); switchPref.setPersistent(checkBox.isPersistent()); switchPref.setEnabled(checkBox.isEnabled()); switchPref.setChecked(checkBox.isChecked()); switchPref.setSummary(checkBox.getSummary()); switchPref.setSummaryOn(checkBox.getSummaryOn()); switchPref.setSummaryOff(checkBox.getSummaryOff()); switchPref.setSwitchTextOn(EMPTY_TEXT); switchPref.setSwitchTextOff(EMPTY_TEXT); group.addPreference(switchPref); switchPref.setDependency(checkBox.getDependency()); }