use of net.osmand.plus.OsmAndAppCustomization in project Osmand by osmandapp.
the class TrackActivity method onBackPressed.
@Override
public void onBackPressed() {
if (openTracksList) {
OsmAndAppCustomization appCustomization = getMyApplication().getAppCustomization();
final Intent favorites = new Intent(this, appCustomization.getFavoritesActivity());
getMyApplication().getSettings().FAVORITES_TAB.set(FavoritesActivity.GPX_TAB);
favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(favorites);
}
super.onBackPressed();
}
use of net.osmand.plus.OsmAndAppCustomization in project Osmand by osmandapp.
the class SettingsOsmEditingActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
((OsmandApplication) getApplication()).applyTheme(this);
super.onCreate(savedInstanceState);
getToolbar().setTitle(R.string.osm_settings);
@SuppressWarnings("deprecation") PreferenceScreen grp = getPreferenceScreen();
DialogPreference loginDialogPreference = new OsmLoginDataDialogPreference(this, null);
grp.addPreference(loginDialogPreference);
CheckBoxPreference poiEdit = createCheckBoxPreference(settings.OFFLINE_EDITION, R.string.offline_edition, R.string.offline_edition_descr);
grp.addPreference(poiEdit);
Preference pref = new Preference(this);
pref.setTitle(R.string.local_openstreetmap_settings);
pref.setSummary(R.string.local_openstreetmap_settings_descr);
pref.setKey("local_openstreetmap_points");
pref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
OsmAndAppCustomization appCustomization = getMyApplication().getAppCustomization();
final Intent favorites = new Intent(SettingsOsmEditingActivity.this, appCustomization.getFavoritesActivity());
favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
getMyApplication().getSettings().FAVORITES_TAB.set(R.string.osm_edits);
startActivity(favorites);
return true;
}
});
grp.addPreference(pref);
}
Aggregations