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:org.gateshipone.malp.application.fragments.EditProfileFragment.java

/**
 * Called when the fragment is first attached to its context.
 *///from   ww  w .  ja  va  2  s  .  c  om
@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 {
        mCallback = (ProfileManageCallbacks) context;
    } catch (ClassCastException e) {
        throw new ClassCastException(context.toString() + " must implement OnArtistSelectedListener");
    }
    // This makes sure that the container activity has implemented
    // the callback interface. If not, it throws an exception
    try {
        mFABCallback = (FABFragmentCallback) context;
    } catch (ClassCastException e) {
        mFABCallback = null;
    }
}

From source file:com.jins_meme.bridge.RootMenuFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);

    Log.d("DEBUG", "ROOT:: onAttach");

    if (context instanceof OnFragmentInteractionListener) {
        mListener = (OnFragmentInteractionListener) context;
    } else {/*from  w w  w.  j a v  a 2 s.  c om*/
        throw new RuntimeException(context.toString() + " must implement OnFragmentInteractionListener");
    }
}

From source file:com.vadimfrolov.duorem.HostSearchFragment.java

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

From source file:org.xbmc.kore.ui.sections.video.TVShowEpisodeListFragment.java

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

From source file:com.esri.android.ecologicalmarineunitexplorer.watercolumn.WaterColumnFragment.java

@Override
public void onAttach(Context activity) {
    super.onAttach(activity);

    // This makes sure that the container activity has implemented
    // the callback interface. If not, it throws an exception
    try {/*from  ww  w.ja v a 2s.  co  m*/
        mCallback = (OnWaterColumnSegmentClickedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement OnWaterColumnSegmentClickedListener");
    }
}

From source file:com.edicon.firebase.devs.firepix.GeoFireFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    if (context instanceof OnGeoFireSelectedListener) {
        mListener = (OnGeoFireSelectedListener) context;
    } else {//  w  w  w.  j  a  va2 s  .c o m
        throw new RuntimeException(context.toString() + " must implement OnPostSelectedListener");
    }
}

From source file:cz.maresmar.sfm.view.menu.day.DayMenuFragment.java

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

From source file:amhamogus.com.daysoff.fragments.CalendarFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);

    // Check that the activity implements the interaction handler
    if (context instanceof CalendarFragment.OnCalendarSelectionListener) {
        calendarSelection = (OnCalendarSelectionListener) context;
    } else {//  www.  j a  va 2  s .  c o  m
        throw new RuntimeException(context.toString() + " must implement OnCalendarSelectionListener");
    }
}

From source file:amhamogus.com.daysoff.fragments.MainListFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    // Check that the activity implements the interaction handler
    if (context instanceof OnListFragmentInteractionListener) {
        mListener = (OnListFragmentInteractionListener) context;
    } else {/*from  w  w  w  .  j a v  a2  s .com*/
        throw new RuntimeException(context.toString() + " must implement OnListFragmentInteractionListener");
    }
}

From source file:com.scooter1556.sms.android.fragment.AudioPlayerFragment.java

@Override
public void onAttach(Context context) {
    super.onAttach(context);
    try {// w w  w .j a  v a2 s  . co m
        audioControllerListener = (AudioControllerListener) context;
    } catch (ClassCastException e) {
        throw new ClassCastException(context.toString() + " must implement AudioControllerListener");
    }
}