Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: 091labs/lo-lo
base: c585c14647
...
head fork: 091labs/lo-lo
compare: 164c9e6fd3
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 11, 2012
Carles Sentis small changes on prefs 164c9e6
Showing with 6 additions and 14 deletions.
  1. +6 −14 src/com/codeskraps/lolo/PrefsActivity.java
20 src/com/codeskraps/lolo/PrefsActivity.java
View
@@ -69,9 +69,7 @@ protected void onCreate(Bundle savedInstanceState) {
chkSync = (CheckBoxPreference) findPreference(Constants.SHOW_SYNC);
chk24 = (CheckBoxPreference) findPreference(Constants.HOUR24);
lstInterval = (ListPreference) findPreference(Constants.INTERVAL);
- Preference prefAbout = (Preference) findPreference(Constants.ABOUT);
-
- prefAbout.setOnPreferenceClickListener(this);
+ ((Preference) findPreference(Constants.ABOUT)).setOnPreferenceClickListener(this);
}
@Override
@@ -122,8 +120,8 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
if (BuildConfig.DEBUG) Log.d(TAG, "onSharedPreferenceChanged");
if (key.equals(Constants.HOUR24)) {
- if (prefs.getBoolean(Constants.HOUR24, true))
- chk24.setSummary(getString(R.string.prefs24_summaryTwo));
+ if (prefs.getBoolean(Constants.HOUR24, true)) chk24
+ .setSummary(getString(R.string.prefs24_summaryTwo));
else chk24.setSummary(getString(R.string.prefs24_summaryOne));
} else if (key.equals(Constants.ONCLICK)) {
@@ -162,18 +160,10 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
@Override
public void onBackPressed() {
+ if (BuildConfig.DEBUG) Log.d(TAG, "onBackPressed");
// This will be called either automatically for you on 2.0
// or later, or by the code above on earlier versions of the
// platform.
- if (BuildConfig.DEBUG) Log.d(TAG, "onBackPressed");
- resultIntent();
- finish();
- return;
- }
-
- private void resultIntent() {
- if (BuildConfig.DEBUG) Log.d(TAG, "resultIntent");
-
if (Constants.CONFIGURE_ACTION.equals(getIntent().getAction())) {
Intent intent = getIntent();
Bundle extras = intent.getExtras();
@@ -187,6 +177,8 @@ private void resultIntent() {
}
}
sendBroadcast(new Intent(Constants.FORCE_WIDGET_UPDATE));
+
+ super.onBackPressed();
}
@Override

No commit comments for this range

Something went wrong with that request. Please try again.