Search code examples
androidactionbarsherlockfragment

How to do this with SherlockFragments?


I am trying to transform an app using fragments into Sherlock and came accross this statement. But I cannot find any implementation of show in Sherlock.

How can I do this in Sherlock?

fragment.show(getSupportFragmentManager(),"dialog");

and this:

fragment.dismissAllowingStateLoss();

Many thanks!


Solution

  • You've probably solved this by now, but for anyone who stumbles upon this thread: you just need to inherit Sherlock counterparts of Activity and Fragment, i.e: SherlockFragmentActivity and SherlockDialogFragment.

    Once you do that, you'll have both of those methods available.