Back to project page Geotrackin.
The source code is released under:
GNU General Public License
If you think the Android project Geotrackin listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
/******************************************************************************* * This file is part of GPSLogger for Android. */* w w w . jav a 2 s .c o m*/ * GPSLogger for Android is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * GPSLogger for Android is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GPSLogger for Android. If not, see <http://www.gnu.org/licenses/>. ******************************************************************************/ package com.geotrackin.gpslogger.settings; import android.content.Intent; import android.os.Bundle; import android.preference.Preference; import android.preference.PreferenceActivity; import android.view.MenuItem; import com.geotrackin.gpslogger.GpsMainActivity; import com.geotrackin.gpslogger.R; import com.geotrackin.gpslogger.senders.osm.OSMHelper; /** * A {@link android.preference.PreferenceActivity} that presents a set of application settings. On * handset devices, settings are presented as a single list. On tablets, * settings are split by category, with category headers shown to the left of * the list of settings. * <p/> * See <a href="http://developer.android.com/design/patterns/settings.html"> * Android Design: Settings</a> for design guidelines and the <a * href="http://developer.android.com/guide/topics/ui/settings.html">Settings * API Guide</a> for more information on developing a Settings UI. */ @SuppressWarnings("deprecation") public class UploadSettingsActivity extends PreferenceActivity implements Preference.OnPreferenceClickListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getActionBar().setDisplayHomeAsUpEnabled(true); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { // Respond to the action bar's Up/Home button case android.R.id.home: Intent intent = new Intent(this, GpsMainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); break; } return super.onOptionsItemSelected(item); } @Override protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); addPreferencesFromResource(R.xml.pref_upload); Preference osmSetupPref = findPreference("osm_setup"); osmSetupPref.setOnPreferenceClickListener(this); } @Override public boolean onPreferenceClick(Preference preference) { if (preference.getKey().equals("osm_setup")) { startActivity(OSMHelper.GetOsmSettingsIntent(getApplicationContext())); return true; } return false; } }