Back to project page trifork-ibeacon-demo.
The source code is released under:
Apache License
If you think the Android project trifork-ibeacon-demo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.trifork.ibeacon; //w ww. j ava2 s . co m import android.app.Fragment; import android.os.Bundle; import android.view.View; import butterknife.ButterKnife; import com.squareup.otto.Bus; import com.trifork.ibeacon.util.PersistentState; import javax.inject.Inject; public class BaseFragment extends Fragment { protected @Inject Bus bus; protected @Inject PersistentState persistentState; public BaseFragment() { super(); BaseApplication.inject(this); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); bus.register(this); } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); ButterKnife.inject(this, view); } @Override public void onDestroy() { super.onDestroy(); ButterKnife.reset(this); bus.unregister(this); } }