aboutsummaryrefslogtreecommitdiffstats
path: root/libraries/ActionBarSherlock/src/com/actionbarsherlock/app
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ActionBarSherlock/src/com/actionbarsherlock/app')
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java6
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java6
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java6
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java6
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragmentActivity.java25
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java6
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java6
-rw-r--r--libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java6
8 files changed, 48 insertions, 19 deletions
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java
index 7b4543640..48a92da65 100644
--- a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java
+++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockActivity.java
@@ -243,6 +243,12 @@ public abstract class SherlockActivity extends Activity implements OnCreatePanel
getSherlock().requestFeature((int)featureId);
}
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
///////////////////////////////////////////////////////////////////////////
// Progress Indication
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java
index a7c856bf0..c139325cd 100644
--- a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java
+++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockDialogFragment.java
@@ -8,9 +8,9 @@ import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener;
+import static android.support.v4.app.Watson.OnCreateOptionsMenuListener;
+import static android.support.v4.app.Watson.OnOptionsItemSelectedListener;
+import static android.support.v4.app.Watson.OnPrepareOptionsMenuListener;
public class SherlockDialogFragment extends DialogFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
private SherlockFragmentActivity mActivity;
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java
index 078f9b0ca..9f4e81d14 100644
--- a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java
+++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockExpandableListActivity.java
@@ -232,6 +232,12 @@ public abstract class SherlockExpandableListActivity extends ExpandableListActiv
getSherlock().requestFeature((int)featureId);
}
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
///////////////////////////////////////////////////////////////////////////
// Progress Indication
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java
index 0f24e9c85..0bdd068a6 100644
--- a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java
+++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockFragment.java
@@ -8,9 +8,9 @@ import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener;
+import static android.support.v4.app.Watson.OnCreateOptionsMenuListener;
+import static android.support.v4.app.Watson.OnOptionsItemSelectedListener;
+import static android.support.v4.app.Watson.OnPrepareOptionsMenuListener;
public class SherlockFragment extends Fragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
private SherlockFragmentActivity mActivity;
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
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java
index aba6d85e8..7ced7812a 100644
--- a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java
+++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListActivity.java
@@ -243,6 +243,12 @@ public abstract class SherlockListActivity extends ListActivity implements OnCre
getSherlock().requestFeature((int)featureId);
}
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
///////////////////////////////////////////////////////////////////////////
// Progress Indication
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java
index 13ca3c49f..7c4d09511 100644
--- a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java
+++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockListFragment.java
@@ -8,9 +8,9 @@ import com.actionbarsherlock.view.Menu;
import com.actionbarsherlock.view.MenuInflater;
import com.actionbarsherlock.view.MenuItem;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnCreateOptionsMenuListener;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnOptionsItemSelectedListener;
-import static com.actionbarsherlock.app.SherlockFragmentActivity.OnPrepareOptionsMenuListener;
+import static android.support.v4.app.Watson.OnCreateOptionsMenuListener;
+import static android.support.v4.app.Watson.OnOptionsItemSelectedListener;
+import static android.support.v4.app.Watson.OnPrepareOptionsMenuListener;
public class SherlockListFragment extends ListFragment implements OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, OnOptionsItemSelectedListener {
private SherlockFragmentActivity mActivity;
diff --git a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java
index bee72cb25..85c6ab214 100644
--- a/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java
+++ b/libraries/ActionBarSherlock/src/com/actionbarsherlock/app/SherlockPreferenceActivity.java
@@ -243,6 +243,12 @@ public abstract class SherlockPreferenceActivity extends PreferenceActivity impl
getSherlock().requestFeature((int)featureId);
}
+ @Override
+ public View findViewById(int id) {
+ getSherlock().ensureActionBar();
+ return super.findViewById(id);
+ }
+
///////////////////////////////////////////////////////////////////////////
// Progress Indication