diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-09 13:19:43 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-09-09 13:19:43 +0200 |
commit | aae87b894f72a719a850ec32ad6944bd5c743331 (patch) | |
tree | b5a221fcb529c07b309f5bde0563155df28a472c /libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java | |
parent | 5b6880d2e34f4c8a4bfba87b5ce53d3c6727b744 (diff) | |
download | open-keychain-aae87b894f72a719a850ec32ad6944bd5c743331.tar.gz open-keychain-aae87b894f72a719a850ec32ad6944bd5c743331.tar.bz2 open-keychain-aae87b894f72a719a850ec32ad6944bd5c743331.zip |
Update actionbarsherlock from 4.2 to 4.4
Diffstat (limited to 'libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java')
-rw-r--r-- | libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java index 3d092f033..e764c170b 100644 --- a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java +++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java @@ -19,7 +19,6 @@ import static com.actionbarsherlock.ActionBarSherlock.OnActionModeStartedListene /** @see {@link android.support.v4.app.Watson} */ public class SherlockFragmentActivity extends Watson implements OnActionModeStartedListener, OnActionModeFinishedListener { - private static final boolean DEBUG = false; private static final String TAG = "SherlockFragmentActivity"; private ActionBarSherlock mSherlock; @@ -139,33 +138,33 @@ public class SherlockFragmentActivity extends Watson implements OnActionModeStar /////////////////////////////////////////////////////////////////////////// public MenuInflater getSupportMenuInflater() { - if (DEBUG) Log.d(TAG, "[getSupportMenuInflater]"); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[getSupportMenuInflater]"); return getSherlock().getMenuInflater(); } public void invalidateOptionsMenu() { - if (DEBUG) Log.d(TAG, "[invalidateOptionsMenu]"); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[invalidateOptionsMenu]"); getSherlock().dispatchInvalidateOptionsMenu(); } public void supportInvalidateOptionsMenu() { - if (DEBUG) Log.d(TAG, "[supportInvalidateOptionsMenu]"); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[supportInvalidateOptionsMenu]"); invalidateOptionsMenu(); } @Override public final boolean onCreatePanelMenu(int featureId, android.view.Menu menu) { - if (DEBUG) Log.d(TAG, "[onCreatePanelMenu] featureId: " + featureId + ", menu: " + menu); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onCreatePanelMenu] featureId: " + featureId + ", menu: " + menu); if (featureId == Window.FEATURE_OPTIONS_PANEL && !mIgnoreNativeCreate) { mIgnoreNativeCreate = true; boolean result = getSherlock().dispatchCreateOptionsMenu(menu); mIgnoreNativeCreate = false; - if (DEBUG) Log.d(TAG, "[onCreatePanelMenu] returning " + result); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onCreatePanelMenu] returning " + result); return result; } return super.onCreatePanelMenu(featureId, menu); @@ -178,14 +177,14 @@ public class SherlockFragmentActivity extends Watson implements OnActionModeStar @Override public final boolean onPreparePanel(int featureId, View view, android.view.Menu menu) { - if (DEBUG) Log.d(TAG, "[onPreparePanel] featureId: " + featureId + ", view: " + view + ", menu: " + menu); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onPreparePanel] featureId: " + featureId + ", view: " + view + ", menu: " + menu); if (featureId == Window.FEATURE_OPTIONS_PANEL && !mIgnoreNativePrepare) { mIgnoreNativePrepare = true; boolean result = getSherlock().dispatchPrepareOptionsMenu(menu); mIgnoreNativePrepare = false; - if (DEBUG) Log.d(TAG, "[onPreparePanel] returning " + result); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onPreparePanel] returning " + result); return result; } return super.onPreparePanel(featureId, view, menu); @@ -198,14 +197,14 @@ public class SherlockFragmentActivity extends Watson implements OnActionModeStar @Override public final boolean onMenuItemSelected(int featureId, android.view.MenuItem item) { - if (DEBUG) Log.d(TAG, "[onMenuItemSelected] featureId: " + featureId + ", item: " + item); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onMenuItemSelected] featureId: " + featureId + ", item: " + item.getTitle()); if (featureId == Window.FEATURE_OPTIONS_PANEL && !mIgnoreNativeSelected) { mIgnoreNativeSelected = true; boolean result = getSherlock().dispatchOptionsItemSelected(item); mIgnoreNativeSelected = false; - if (DEBUG) Log.d(TAG, "[onMenuItemSelected] returning " + result); + if (ActionBarSherlock.DEBUG) Log.d(TAG, "[onMenuItemSelected] returning " + result); return result; } return super.onMenuItemSelected(featureId, item); @@ -276,6 +275,12 @@ public class SherlockFragmentActivity extends Watson implements OnActionModeStar getSherlock().requestFeature((int)featureId); } + @Override + public View findViewById(int id) { + getSherlock().ensureActionBar(); + return super.findViewById(id); + } + /////////////////////////////////////////////////////////////////////////// // Progress Indication |