title: opening a SherlockFragment activity from non activity class?
body: <p>i am trying to open a SherlockFragment activity from non activity class 
  using this from an normal activity </p>
  
  <p>Android.app.Activity >> NonActivityClass >> SherlockFragmentActivity</p>
  
  <p>Passing this from Activity class to NonActivityClass and trying to start the SherlockFragmentActivity</p>
  
  <p>Code - </p>
  
  <pre><code>private void changeFragment(Activity act) {
  
          Fragment profileFrag = new New_ProfileFragment();
          FragmentTransaction transaction = ((SherlockFragmentActivity) act)
                  .getSupportFragmentManager().beginTransaction();
  
          try {
              ((SherlockFragmentActivity) act).getSupportFragmentManager()
                      .popBackStackImmediate(profileFrag.toString(),
                              FragmentManager.POP_BACK_STACK_INCLUSIVE);
          } catch (java.lang.IllegalStateException e) {
  
          }
  
          transaction.addToBackStack(profileFrag.toString());
          transaction.replace(R.id.content_frame, profileFrag);
          transaction.commitAllowingStateLoss();
          ((SherlockFragmentActivity) act).getSupportFragmentManager()
                  .executePendingTransactions();
  
      }
  </code></pre>
  
  <p><strong>I am getting error in</strong>  </p>
  
  <pre><code>FragmentTransaction transaction = ((SherlockFragmentActivity) act)
                  .getSupportFragmentManager().beginTransaction();
  </code></pre>
  
  <p><strong>Exception</strong> - java.lang.ClassCastException: activity cannot be cast to com.actionbarsherlock.app.SherlockFragmentActivity</p>