Example usage for android.app Activity toString

List of usage examples for android.app Activity toString

Introduction

In this page you can find the example usage for android.app Activity toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:com.nearnotes.NoteLocation.java

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

    try {/*from  w w w.java 2 s . c om*/
        mCallback = (NoteLocationListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement NoteLocationListener");
    }
}

From source file:net.alexjf.tmm.fragments.MoneyNodeEditorFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from www .ja  va  2  s.  c  o  m*/
        listener = (OnMoneyNodeEditListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnMoneyNodeEditListener");
    }
}

From source file:com.nbplus.vbroadlauncher.fragment.RadioGridFragment.java

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

    mActivity = activity;/* www  .ja  v  a2 s  .  c om*/
    try {
        mListener = (OnRadioFragmentInteractionListener) activity;
        ((RadioActivity) mActivity).setOnRadioActivityInteractionListener(this);
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener");
    }
}

From source file:org.jamienicol.episodes.EpisodesListFragment.java

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

    try {//from  w  w w.j a v  a  2  s  .c o  m
        onEpisodeSelectedListener = (OnEpisodeSelectedListener) activity;
    } catch (ClassCastException e) {
        final String message = String.format("%s must implement OnEpisodeSelectedListener",
                activity.toString());
        throw new ClassCastException(message);
    }
}

From source file:com.royclarkson.springagram.PhotoListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from  w w  w . j a v a 2  s .  com*/
        this.photoListFragmentListener = (PhotoListFragmentListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnPhotoSelectedListener");
    }
}

From source file:com.davidmascharka.lips.SelectBuildingDialogFragment.java

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

    // Verify the host activity implements the callback interface
    try {//from  w  w  w . jav a2 s  . c o  m
        // Instantiate the listener so we can send events to the host
        listener = (SelectBuildingDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface
        throw new ClassCastException(activity.toString() + " must implement SelectBuildingDialogListener");
    }
}

From source file:com.google.cloud.solutions.cloudadventure.PreGameFragment.java

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

    // Set the callback activity to use
    try {/*w  w w  . ja  v a 2 s . c  o m*/
        callback = (OnPreGameClickListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnPreGameClickListener");
    }

    // Handle entrance logic
    if (Constants.GAME_ENTRANCE_ACTION_CREATOR
            .equals(activity.getIntent().getStringExtra(Constants.GAME_ENTRANCE_ACTION_INTENT_EXTRA_KEY))) {
        mIsCreator = true;
    } else {
        mIsCreator = false;
    }
}

From source file:org.scompo.android.fuellogger.FragmentDetails.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  .  j  av  a2s  .com*/
        mCallBack = (OnButtonClickedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnButtonClickedListener");
    }
}

From source file:com.davidmascharka.lips.SelectPartitionDialogFragment.java

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

    // Verify the host activity implements the callback interface
    try {/*from   w ww  .  j  a  va  2s .c o  m*/
        // Instantiate the listener so we can send events to the host
        listener = (SelectPartitionDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface
        throw new ClassCastException(activity.toString() + " must implement SelectPartitionDialogListener");
    }
}

From source file:org.jamienicol.episodes.SeasonsListFragment.java

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

    try {//w  ww.j a  v  a2  s  . c om
        onSeasonSelectedListener = (OnSeasonSelectedListener) activity;
    } catch (ClassCastException e) {
        final String message = String.format("%s must implement OnSeasonSelectedListener", activity.toString());
        throw new ClassCastException(message);
    }
}