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.tearoffcalendar.activities.FaceDownCardFragment.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  w  w.j av  a 2 s  .  c om*/
        onFaceDownCardClickListener = (OnFaceDownCardClickListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnFaceDownCardClickListener");
    }
}

From source file:com.stanzione.licensesmanagement.ui.CompanyListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    if (activity instanceof OnFragmentInteractionListener) {
        mListener = (OnFragmentInteractionListener) activity;
    } else {//from  ww  w. ja  v a  2s  .c  o  m
        throw new RuntimeException(activity.toString() + " must implement OnFragmentInteractionListener");
    }
}

From source file:com.dabay6.android.apps.carlog.ui.base.fragments.BaseDeleteListFragment.java

/**
 * {@inheritDoc}/*from   w ww  . j  a v a2 s  . c o m*/
 */
@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

    try {
        onEntityListListener = (OnEntityListListener) activity;
    } catch (final ClassCastException ex) {
        throw new ClassCastException(activity.toString() + " must implement OnEntityListListener");
    }
}

From source file:com.loloof64.android.chess_position_manager.file_explorer.NewDirectoryDialogFragment.java

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

    // Verify that the host activity implements the callback interface
    try {//w w w. j  ava  2 s.co m
        // Instantiate the dialogListener so we can send events to the host
        listener = (NewDirectoryDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        throw new ClassCastException(activity.toString() + " must implement NewDirectoryDialogListener");
    }
}

From source file:com.loloof64.android.chess_position_manager.file_explorer.NewPositionDialogFragment.java

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

    // Verify that the host activity implements the callback interface
    try {/*from  w w  w.j av  a 2s  .c  om*/
        // Instantiate the dialogListener so we can send events to the host
        listener = (NewPositionDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        throw new ClassCastException(activity.toString() + " must implement NewPositionDialogListener");
    }
}

From source file:com.bexkat.feedlib.ItemListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*ww  w .j ava  2  s  .c  o m*/
        callback = (IndicatorCallback) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement IndicatorCallback");
    }
}

From source file:com.learnNcode.mediachooser.fragment.ImageFragment.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 {// ww w.  j  a  v  a  2  s  .c  om
        mCallback = (OnImageSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener");
    }

}

From source file:edu.vuum.mocca.ui.tags.CreateTagsFragment.java

@Override
public void onAttach(Activity activity) {
    // TODO Auto-generated method stub
    super.onAttach(activity);
    try {/*from w w w.  j  a  v a2 s .  c  o  m*/
        mOpener = (OnOpenWindowInterface) activity;
        resolver = new MoocResolver(activity);
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnOpenWindowListener");
    }
}

From source file:com.firma.dev.letschat.MyFavoriteFragment.java

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

    try {/*from   ww  w .  ja  v  a  2 s  .  co  m*/
        signalCallback = (onUserTimerForcedToExpire) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement onUserTimerForcedToExpire");
    }
}

From source file:com.nikhilnayak.games.octoshootar.ui.fragments.GameModeChooserFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    if (activity instanceof GameScoreFragment.Listener) {
        mListener = (GameModeChooserFragment.Listener) activity;
        mPlayerProfile = new PlayerProfile(
                activity.getSharedPreferences(PlayerProfile.SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE));
    } else {// w w w.  j a v a 2 s  . co  m
        throw new ClassCastException(activity.toString() + " must implement GameModeChooserFragment.Listener");
    }
}