List of usage examples for android.content Context toString
public String toString()
From source file:com.rascarlo.aurdroid.ui.SearchFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof SearchFragmentCallback) { searchFragmentCallback = (SearchFragmentCallback) context; } else {/*w ww . j a va 2 s.c om*/ throw new RuntimeException(context.toString() + " must implement SearchFragmentCallback"); } }
From source file:com.barak.pix.PostsFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnPostSelectedListener) { mListener = (OnPostSelectedListener) context; } else {//from w ww. j a va 2 s .c om throw new RuntimeException(context.toString() + " must implement OnPostSelectedListener"); } }
From source file:de.badaix.snapcast.ClientListFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof ClientItem.ClientInfoItemListener) { clientInfoItemListener = (ClientItem.ClientInfoItemListener) context; } else {/*from w w w . j a va 2 s . c o m*/ throw new RuntimeException(context.toString() + " must implement ClientInfoItemListener"); } updateGui(); }
From source file:org.asteroidos.sync.fragments.DeviceListFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnDefaultDeviceSelectedListener) mDeviceListener = (OnDefaultDeviceSelectedListener) context; else/* www . j ava 2s. c o m*/ throw new ClassCastException( context.toString() + " does not implement DeviceListFragment.OnDeviceSelectedListener"); if (context instanceof OnScanRequestedListener) mScanListener = (OnScanRequestedListener) context; else throw new ClassCastException( context.toString() + " does not implement DeviceListFragment.OnScanRequestedListener"); }
From source file:com.scooter1556.sms.android.fragment.AudioPlaylistFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); try {//from w ww. j a v a 2s. c o m audioPlaylistListener = (AudioPlaylistListener) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement AudioPlaylistListener"); } }
From source file:com.rascarlo.aurdroid.ui.InfoResultFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof InfoResultFragmentCallback) { infoResultFragmentCallback = (InfoResultFragmentCallback) context; } else {/*from w ww . j ava 2 s .c om*/ throw new RuntimeException(context.toString() + " must implement InfoResultFragmentCallback"); } }
From source file:com.adkdevelopment.rssreader.ui.ListFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnFragmentListener) { mListener = (OnFragmentListener) context; } else {/*from ww w. ja va 2s .co m*/ throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener"); } }
From source file:edumsg.edumsg_android_app.ConversationFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); try {/* w ww. j a v a2 s .com*/ mCallback = (OnMessageSentListener) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement OnHeadlineSelectedListener"); } }
From source file:com.scooter1556.sms.android.fragment.MediaElementFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); try {//w w w. j a v a 2s. c o m mediaElementListener = (MediaElementListener) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement MediaElementListener"); } }
From source file:org.gateshipone.odyssey.dialogs.ChooseBookmarkDialog.java
@Override public void onAttach(Context context) { super.onAttach(context); // 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 a 2 s .com*/ mSaveCallback = (OnSaveDialogListener) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement OnSaveDialogListener"); } }