List of usage examples for android.app Activity toString
@Override
public String toString()
From source file:com.sandklef.coachapp.fragments.TrainingPhasesFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w w w.j a v a 2 s.c o m*/ mListener = (TrainingPhasesFragmentListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement TrainingPhasesFragmentListener"); } }
From source file:ca.ualberta.cs.cmput301w15t04team04project.FragmentEditItem2.java
/** * <p>This part of code is copied from:<br> * {@link http://stackoverflow.com/questions/13116104/best-practice-to-reference-the-parent-activity-of-a-fragment} * @since March 26// ww w . ja v a2s . c o m */ @Override public void onAttach(Activity activity) { super.onAttach(activity); try { myActivity = (EditItemActivity) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must be EditItemActivity "); } }
From source file:com.battlelancer.seriesguide.ui.PeopleFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from www. ja v a2 s . co m*/ mListener = (OnShowPersonListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnShowPersonListener"); } }
From source file:org.creativecommons.thelist.misc.UploadFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/* www. j av a 2 s .c om*/ mCallback = (UploadListener) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + activity.getString(R.string.confirm_callback_exception_message)); } }
From source file:com.cuddlesoft.nori.fragment.ImageFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/* www . j ava 2s . c om*/ listener = (ImageFragmentListener) getActivity(); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } }
From source file:com.google.cloud.backend.core.CloudBackendFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from w w w . j av a 2 s . c om callback = (OnListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnListener"); } if (mImageLoader == null) { mImageLoader = new ImageLoader(newRequestQueue(getActivity()), mImageCache); } }
From source file:com.wly.net.PortScanTask.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); // This makes sure that the container activity has implemented // the callback interface. If not, it throws an exception. try {// w w w .j a v a2s .c o m mCallback = (OnPortSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnPortSelectedListener"); } }
From source file:com.morlunk.mumbleclient.servers.FavouriteServerListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/* w w w .ja v a 2 s .c o m*/ mConnectHandler = (ServerConnectHandler) activity; mDatabaseProvider = (DatabaseProvider) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement ServerConnectHandler!"); } }
From source file:org.creativecommons.thelist.fragments.NavigationDrawerFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from www . ja v a2 s . c om mCallback = (NavigationDrawerListener) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + activity.getString(R.string.R_string_drawer_callback_exception_message)); } }
From source file:com.lambdasoup.quickfit.ui.DayOfWeekDialogFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof OnFragmentInteractionListenerProvider) { listener = ((OnFragmentInteractionListenerProvider) activity) .getOnDayOfWeekDialogFragmentInteractionListener(); } else {//from ww w . ja va2 s . co m throw new RuntimeException( activity.toString() + " must implement OnFragmentInteractionListenerProvider"); } }