List of usage examples for android.app Activity toString
@Override
public String toString()
From source file:com.shinymayhem.radiopresets.DialogFragmentAdd.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from ww w.j a v a 2s .co m*/ // Instantiate the ListenerAddDialog so we can send events to the host mListener = (ListenerAddDialog) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception throw new ClassCastException(activity.toString() + " must implement ListenerAddDialog"); } }
From source file:com.royclarkson.springagram.PhotoAddFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w w w.j ava 2 s. c o m*/ photoAddFragmentListener = (PhotoAddFragmentListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement PhotoAddFragmentListener"); } }
From source file:com.shinymayhem.radiopresets.DialogFragmentEvent.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// w ww . j av a 2 s.c o m // Instantiate the ListenerAddDialog so we can send events to the host mListener = (ListenerEventDialog) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception throw new ClassCastException(activity.toString() + " must implement ListenerAddDialog"); } }
From source file:com.royclarkson.springagram.PhotoAddToGalleryFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//www. j av a2s . c o m this.photoAddToGalleryFragmentListener = (PhotoAddToGalleryFragmentListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement PhotoAddToGalleryFragmentListener"); } }
From source file:com.arcgis.android.samples.geometrysample.SampleListFragment.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 {//from w w w . j a v a2s . c o m mCallback = (OnSampleNameSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnSampleNameSelectedListener"); } }
From source file:com.dycody.android.idealnote.utils.date.TimePickerFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); mActivity = activity;/*from w w w.jav a 2s. c om*/ if (getArguments().containsKey(DEFAULT_TIME)) { this.defaultTime = getArguments().getLong(DEFAULT_TIME); } try { mListener = (OnTimeSetListener) mActivity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnTimeSetListener"); } }
From source file:org.mozilla.search.PreSearchFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof AcceptsSearchQuery) { searchListener = (AcceptsSearchQuery) activity; } else {/* ww w . j av a 2s. c om*/ throw new ClassCastException(activity.toString() + " must implement AcceptsSearchQuery."); } }
From source file:org.creativecommons.thelist.fragments.GalleryFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from w w w. j a va2 s .c o m mCallback = (GalleryListener) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + activity.getString(R.string.gallery_callback_exception_message)); } }
From source file:edu.vuum.mocca.ui.tags.TagsListFragment.java
@Override public void onAttach(Activity activity) { Log.d(LOG_TAG, "onAttach start"); super.onAttach(activity); try {//from www.ja v a2s.com mOpener = (OnOpenWindowInterface) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + " must implement OnOpenWindowListener" + e.getMessage()); } Log.d(LOG_TAG, "onAttach end"); }
From source file:org.scompo.android.fuellogger.FragmentResume.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 {/*from w ww.ja va 2 s . c om*/ mCallBack = (OnFillupSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFillupSelectedListener"); } }