com.actionbarsherlock.app.SherlockListActivity Java Examples
The following examples show how to use
com.actionbarsherlock.app.SherlockListActivity.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PullToRefreshAttacher.java From endpoints-codelab-android with GNU General Public License v3.0 | 6 votes |
/** * @return Context which should be used for inflating the header layout */ public Context getContextForInflater(Activity activity) { if (activity instanceof SherlockActivity) { return ((SherlockActivity) activity).getSupportActionBar().getThemedContext(); } else if (activity instanceof SherlockListActivity) { return ((SherlockListActivity) activity).getSupportActionBar().getThemedContext(); } else if (activity instanceof SherlockFragmentActivity) { return ((SherlockFragmentActivity) activity).getSupportActionBar() .getThemedContext(); } else if (activity instanceof SherlockExpandableListActivity) { return ((SherlockExpandableListActivity) activity).getSupportActionBar() .getThemedContext(); } else if (activity instanceof SherlockPreferenceActivity) { return ((SherlockPreferenceActivity) activity).getSupportActionBar() .getThemedContext(); } return super.getContextForInflater(activity); }
Example #2
Source File: FadingActionBarHelper.java From Favorite-Android-Client with Apache License 2.0 | 6 votes |
private ActionBar getActionBar(Activity activity) { if (activity instanceof SherlockActivity) { return ((SherlockActivity) activity).getSupportActionBar(); } if (activity instanceof SherlockFragmentActivity) { return ((SherlockFragmentActivity) activity).getSupportActionBar(); } if (activity instanceof SherlockListActivity) { return ((SherlockListActivity) activity).getSupportActionBar(); } ActionBar actionBar = getActionBarWithReflection(activity, "getSupportActionBar"); if (actionBar == null) { throw new RuntimeException("Activity should derive from one of the ActionBarSherlock activities " + "or implement a method called getSupportActionBar"); } return actionBar; }
Example #3
Source File: FadingActionBarHelper.java From FadingActionBar with Apache License 2.0 | 6 votes |
private ActionBar getActionBar(Activity activity) { if (activity instanceof SherlockActivity) { return ((SherlockActivity) activity).getSupportActionBar(); } if (activity instanceof SherlockFragmentActivity) { return ((SherlockFragmentActivity) activity).getSupportActionBar(); } if (activity instanceof SherlockListActivity) { return ((SherlockListActivity) activity).getSupportActionBar(); } ActionBar actionBar = getActionBarWithReflection(activity, "getSupportActionBar"); if (actionBar == null) { throw new RuntimeException("Activity should derive from one of the ActionBarSherlock activities " + "or implement a method called getSupportActionBar"); } return actionBar; }