roboguice.inject.FragmentManagerProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of roboguice Show documentation
Show all versions of roboguice Show documentation
A framework for using Google Guice dependency injection in Android.
package roboguice.inject;
import com.google.inject.Inject;
import com.google.inject.Provider;
import android.app.Activity;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
@ContextSingleton
public class FragmentManagerProvider implements Provider {
@Inject protected Activity activity;
@Override
public FragmentManager get() {
// BUG only supports compat library at the moment. Does not support honeycomb directly yet
return ((FragmentActivity)activity).getSupportFragmentManager();
}
}