Example usage for android.content Context toString

List of usage examples for android.content Context toString

Introduction

In this page you can find the example usage for android.content Context toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of the object.

Usage

From source file:com.app.cat.ui.fragment.CallFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    if (context instanceof CallFragmentListener) {
        mListener = (CallFragmentListener) context;
    } else {/*www.  j a  v a  2  s. co  m*/
        throw new RuntimeException(context.toString() + " must implement CallFragmentListener");
    }
}

From source file:com.zestedesavoir.android.settings.SettingsFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    setHasOptionsMenu(true);//from w  w  w. ja va  2s .co  m
    try {
        listener = (OnNavigationListener) context;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                context.toString() + " must implement " + OnNavigationListener.class.getName());
    }
}

From source file:org.gluu.super_gluu.app.fragments.PinCodeFragment.PinCodeSettingFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    if (context instanceof LicenseFragment.OnMainActivityListener) {
        mainActivityListener = (LicenseFragment.OnMainActivityListener) context;
    } else {//  ww  w  . j  a va 2 s.  c o m
        throw new RuntimeException(context.toString() + " must implement OnMainActivityListener");
    }
}

From source file:com.fingerprint.FingerprintAuthenticationDialogFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    try {//w w w .ja  v a  2 s .co m
        callback = (Callback) context;
    } catch (ClassCastException e) {
        throw new ClassCastException(context.toString() + " must implement ConfigListener");
    }
}

From source file:org.gluu.oxpush2.app.MainActivityFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    if (context instanceof OxPush2RequestListener) {
        oxPush2RequestListener = (OxPush2RequestListener) context;
    } else {/*from   w  w  w .jav  a2  s  .c  o  m*/
        throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener");
    }
}

From source file:org.gluu.super_gluu.app.fragments.LicenseFragment.LicenseFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    if (context instanceof OnMainActivityListener) {
        mainActivityListener = (OnMainActivityListener) context;
    } else {//from w w  w.  j  a  v a  2 s.  c  o m
        throw new RuntimeException(context.toString() + " must implement OnMainActivityListener");
    }
}

From source file:augsburg.se.alltagsguide.event.EventOverviewFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    try {// ww w.  j  a v a  2s .c  o  m
        mListener = (OnEventPageFragmentInteractionListener) context;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                context.toString() + " must implement OnEventPageFragmentInteractionListener");
    }
}

From source file:com.app.cat.ui.fragment.OutgoingCallFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    if (context instanceof OutgoingCallFragmentListener) {
        mListener = (OutgoingCallFragmentListener) context;
    } else {/*from w  w w.  j ava 2  s. co m*/
        throw new RuntimeException(context.toString() + " must implement OutgoingCallFragmentListener");
    }
}

From source file:com.app.cat.ui.fragment.IncomingCallFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    if (context instanceof IncomingCallFragmentListener) {
        mListener = (IncomingCallFragmentListener) context;
    } else {/*from  w ww .j  a  va 2 s .  com*/
        throw new RuntimeException(context.toString() + " must implement IncomingCallFragmentListener");
    }
}

From source file:augsburg.se.alltagsguide.settings.PrefFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    try {/*from  w w w  . j a v a  2 s.  c  o  m*/
        mListener = (OnPreferenceListener) context;
    } catch (ClassCastException e) {
        throw new ClassCastException(context.toString() + " must implement OnPageFragmentInteractionListener");
    }
}