Code example for SupportMapFragment

import com.actionbarsherlock.view.Menu; 
import com.actionbarsherlock.view.MenuInflater; 
import com.actionbarsherlock.view.MenuItem; 
public class SherlockMapFragment extends SupportMapFragment implements
    OnCreateOptionsMenuListener, OnPrepareOptionsMenuListener, 
    OnOptionsItemSelectedListener { 
  private SherlockFragmentActivity mActivity;
  public SherlockFragmentActivity getSherlockActivity() { 
    return mActivity;
  public void onAttach(Activity activity) {
    if (!(activity instanceof SherlockFragmentActivity)) {
      throw new IllegalStateException(getClass().getSimpleName()
          + " must be attached to a SherlockFragmentActivity."); 
Stop searching for code, let great code find you!  Add Codota to your java IDE