public void renderTo (final @Nonnull TextView textView, @Nonnull Object... extra) { final StringBuilder builder = new StringBuilder(); builder.append(generalPreferences.get().formatDateAndTime(observation.getDate(), "<b>", "</b>")); final Location location = observation.getLocation(); if (location != null) // shouldn't happen, but it does because of various bugs { builder.append("<br>"); builder.append(location.getDisplayName()); try { final Range range = location.as(Range); builder.append(String.format("<br><small>%s</small>", locationPreferences.get().format(range))); } catch (AsException e) { // range not available, never mind } } textView.setText(Html.fromHtml(builder.toString())); } }
public void onSharedPreferenceChanged (final @Nonnull SharedPreferences sharedPreferences, final @Nonnull String string) { setAddressSearchEnabled(locationPreferences.isReverseGeocodingEnabled()); } };
setAddressSearchEnabled(locationPreferences.isReverseGeocodingEnabled()); setState(IDLE); setProviderName(locationManager.getBestProvider((Criteria)locationPreferences.getCriteria(), true));
setAddressSearchEnabled(locationPreferences.isReverseGeocodingEnabled()); setState(IDLE); setProviderName(locationManager.getBestProvider((Criteria)locationPreferences.getCriteria(), true));
buffer.append(" - ").append(locationPreferences.format(location.as(Range)));
public void onSharedPreferenceChanged (final @Nonnull SharedPreferences sharedPreferences, final @Nonnull String string) { setAddressSearchEnabled(locationPreferences.isReverseGeocodingEnabled()); } };
etCoordinate.setText(locationPreferences.format(range)); btRecomputePlace.setEnabled(true);