2

I have an activity derived from SherlockListActivity and I am wanting to show a SherlockDialogFragment inside this activity. The show method of the dialog instance requires a SupportFragmentManager, but it seems that SherlockListActivity only has the method getFragmentManager and not getSupportFragmentManager.

Does anyone know why the method getSupportFragmentManager is missing and how I could workaround this issue?

BruceHill
  • 6,954
  • 8
  • 62
  • 114

1 Answers1

7

Does anyone know why the method getSupportFragmentManager is missing

Because SherlockListActivity inherits from ListActivity, not from FragmentActivity.

how I could workaround this issue?

Do not use SherlockListActivity. Use SherlockFragmentActivity and either a SherlockListFragment or your own ListView management code.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thanks, CommonsWare for explaining this. I was hoping that there would be a way to get `SupportFragmentManager` without changing the `SherlockListActivity` to a `SherlockFragmentActivity`, but alas. It is just that I have a base class that I defined that inherited from `FragmentListActivity` and it is working perfectly except for this issue and now I am struggling to get it working correctly with it inheriting from `SherlockFragmentActivity`. But thanks for your response. – BruceHill Apr 07 '13 at 09:42