use of com.orgzly.android.Shelf in project orgzly-android by orgzly.
the class SyncFragment method onAttach.
/**
* Hold a reference to the parent Activity so we can report the
* task's current progress and results. The Android framework
* will pass us a reference to the newly created Activity after
* each configuration change.
*/
@Override
public void onAttach(Context context) {
if (BuildConfig.LOG_DEBUG)
LogUtils.d(TAG, getActivity());
super.onAttach(context);
/* This makes sure that the container activity has implemented
* the callback interface. If not, it throws an exception
*/
try {
mListener = (SyncFragmentListener) getActivity();
} catch (ClassCastException e) {
throw new ClassCastException(getActivity().toString() + " must implement " + SyncFragmentListener.class);
}
mShelf = new Shelf(context.getApplicationContext());
resources = context.getResources();
}
Aggregations