Java Code Examples for android.widget.NumberPicker#setVisibility()
The following examples show how to use
android.widget.NumberPicker#setVisibility() .
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: LocationPopup.java From arcusandroid with Apache License 2.0 | 6 votes |
@Override @SuppressWarnings({"unchecked"}) public void doContentSection() { if (getArguments() != null) { Serializable object = getArguments().getSerializable(LOCATIONS); if (object != null) { locations = (ArrayList<String>) object; } } picker = (NumberPicker) contentView.findViewById(R.id.floating_day_number_picker); picker.setVisibility(View.GONE); picker.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS); picker.setMinValue(0); String[] displayedValues = new String[locations.size()]; for (int i = 0; i < locations.size(); i++) { displayedValues[i] = locations.get(i); } picker.setMaxValue(displayedValues.length - 1); picker.setDisplayedValues(displayedValues); picker.setVisibility(View.VISIBLE); }
Example 2
Source File: TimezonePickerPopup.java From arcusandroid with Apache License 2.0 | 6 votes |
@Override public void doContentSection() { timezones = getTimezones(); picker = (NumberPicker) contentView.findViewById(R.id.floating_day_number_picker); picker.setVisibility(View.GONE); picker.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS); picker.setMinValue(0); String[] displayedValues = new String[timezones.size()]; for (int i = 0; i < timezones.size(); i++) { displayedValues[i] = timezones.get(i).getName(); } picker.setMaxValue(displayedValues.length - 1); picker.setDisplayedValues(displayedValues); picker.setValue(getIndexOfCurrentZoneOrDefault(0)); picker.setVisibility(View.VISIBLE); Bundle args = getArguments(); if (args == null) { forceNotification = false; } else { forceNotification = args.getBoolean(FORCE_NOTIFICATION, false); } }