List of usage examples for android.content Context toString
public String toString()
From source file:io.github.ciscorucinski.nanodegree.android.capstone.YouTubeVideoFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof YouTubeVideoFragmentListener) { mListener = (YouTubeVideoFragmentListener) context; } else {/*w w w .ja v a2s . co m*/ throw new RuntimeException(context.toString() + " must implement YouTubeVideoFragmentListener"); } mListener.onReveiveYouTubeProvider(getYouTubePlayerProvider(), this); }
From source file:de.badaix.snapcast.GroupListFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof GroupItem.GroupItemListener) { groupItemListener = (GroupItem.GroupItemListener) context; } else {// w ww.j a v a 2s . c o m throw new RuntimeException(context.toString() + " must implement GroupItemListener"); } updateGui(); }
From source file:org.akvo.caddisfly.sensor.colorimetry.strip.camera.InstructionFragment.java
@Override public void onAttach(@NonNull Context context) { super.onAttach(context); try {//from ww w .jav a 2 s . c om mListener = (CameraViewListener) context; } catch (ClassCastException e) { throw new IllegalArgumentException(context.toString() + " must implement CameraViewListener", e); } }
From source file:es.wolfi.app.passman.CredentialDisplay.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnCredentialFragmentInteraction) { mListener = (OnCredentialFragmentInteraction) context; } else {//from www. j a v a2 s. co m throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener"); } }
From source file:com.fingerprint.PasswordAuthenticationDialogFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); try {/*from w w w .j av a 2 s .c o m*/ callback = (Callback) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement ConfigListener"); } }
From source file:org.akvo.caddisfly.sensor.ec.EditSensorIdentity.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnFragmentInteractionListener) { mListener = (OnFragmentInteractionListener) context; } else {//from w w w .j a v a2s . c om throw new IllegalArgumentException( context.toString() + " must implement OnFragmentInteractionListener"); } }
From source file:com.scooter1556.sms.android.fragment.AudioPlayerSmallFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); try {// w ww.ja va 2 s . c o m audioControllerListener = (AudioPlayerFragment.AudioControllerListener) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement AudioControllerListener"); } }
From source file:inc.bait.jubilee.ui.fragments.NewsFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnListFragmentInteractionListener) { listener = (OnListFragmentInteractionListener) context; } else {/*w w w . ja v a2s . c o m*/ throw new RuntimeException( context.toString() + " must implement " + "OnListFragmentInteractionListener"); } }
From source file:org.sufficientlysecure.keychain.ui.ImportKeysSearchFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); try {/*from w ww . j a v a 2s . com*/ mCallback = (ImportKeysListener) context; } catch (ClassCastException e) { throw new ClassCastException(context.toString() + " must implement ImportKeysListener"); } mActivity = (Activity) context; }
From source file:inc.bait.jubilee.ui.fragments.ActionFragment.java
@Override public void onAttach(Context context) { super.onAttach(context); this.context = context; if (context instanceof OnListFragmentInteractionListener) { listener = (OnListFragmentInteractionListener) context; } else {/*from w w w . ja v a2 s . c om*/ throw new RuntimeException(context.toString() + " must implement OnListFragmentInteractionListener"); } }