roboguice.fragment.RoboFragment 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.
The newest version!
package roboguice.fragment;
import roboguice.RoboGuice;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;
public abstract class RoboFragment extends Fragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
RoboGuice.getInjector(getActivity()).injectMembersWithoutViews(this);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
RoboGuice.getInjector(getActivity()).injectViewMembers(this);
}
}