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.gmail.taneza.ronald.carbs.myfoods.MyFoodsEditableFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from   w  ww .  ja va2 s .  co m
        mMyFoodsActivityNotifier = (MyFoodsActivityNotifier) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement MyFoodsActivityNotifier");
    }
}

From source file:edu.cmu.cylab.starslinger.view.IntroductionFragment.java

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

    try {//from w w  w .  j a v a2s  . co  m
        mResult = (OnIntroResultListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + OnIntroResultListener.class.getSimpleName());
    }
}

From source file:com.ntsync.android.sync.activities.RegistrateProgressDialog.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from   w  w w.  java  2 s  .c  o m*/
        resultListener = (RegistrateDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        ClassCastException ex = new ClassCastException(
                activity.toString() + " must implement RegistrateDialogListener");
        ex.initCause(e);
        throw ex;
    }
}

From source file:com.ntsync.android.sync.activities.LoginProgressDialog.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*w  w  w  .j av  a  2s  . c  om*/
        resultListener = (LoginDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        ClassCastException ex = new ClassCastException(
                activity.toString() + " must implement LoginDialogListener");
        ex.initCause(e);
        throw ex;
    }
}

From source file:com.anton.gavel.PersonalInfoDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    // Verify that the host activity implements the callback interface
    try {/*from   www .  j a va  2  s  .c o  m*/
        // Instantiate the NoticeDialogListener so we can send events to the host
        mListener = (PersonalInfoListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        throw new ClassCastException(activity.toString() + " must implement PersonalInfoListener");
    }
}

From source file:jp.co.conit.sss.sp.ex1.fragment.AbstStoreListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from  w  ww .j av  a2  s  .  c o  m*/
        mStoreFragmentListener = (StoreFragmentListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement StoreFragmentListener");
    }
    mListFooterManager = new ListFooterManager(getActivity());
}

From source file:com.media.LuYinFragment.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 .ja v a2  s .c o  m
        mCallback = (OnLuYinSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnLuYinSelectedListener");
    }
}

From source file:com.syncedsynapse.kore2.ui.MusicVideoListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from   ww w .ja  v  a  2  s .  co m*/
        listenerActivity = (OnMusicVideoSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnMusicVideoSelectedListener");
    }
}

From source file:net.simonvt.cathode.ui.fragment.SearchShowFragment.java

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

From source file:at.ac.tuwien.detlef.fragments.EpisodeListSortDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    // Verify that the host activity implements the callback interface
    try {//from  w  ww  .j av a  2 s  .  c o  m
        // Instantiate the NoticeDialogListener so we can send events to the
        // host
        mListener = (NoticeDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        throw new ClassCastException(activity.toString() + " must implement NoticeDialogListener");
    }
}