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.andryr.musicplayer.fragments.AlbumFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from w  w  w  . j  av  a2  s  .  c o  m
        mActivity = (MainActivity) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener");
    }
}

From source file:org.mozilla.search.autocomplete.SuggestionsFragment.java

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

    if (activity instanceof AcceptsSearchQuery) {
        searchListener = (AcceptsSearchQuery) activity;
    } else {/*  ww  w  . j  a  v a2 s .  c  o m*/
        throw new ClassCastException(activity.toString() + " must implement AcceptsSearchQuery.");
    }

    suggestionLoaderCallbacks = new SuggestionLoaderCallbacks();
    autoCompleteAdapter = new AutoCompleteAdapter(activity);
}

From source file:com.undatech.opaque.dialogs.ManageCustomCaFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//  ww w .  j  a va 2  s  .c  om
        dismissalListener = (OnFragmentDismissedListener) activity;
        android.util.Log.e(TAG, "onAttach: assigning OnFragmentDismissedListener");
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnFragmentDismissedListener");
    }
}

From source file:com.mattprecious.notisync.fragment.RequestTagsDialogFragment.java

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

From source file:dat255.grupp06.bibbla.fragments.ProfileFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from  www.j a  v  a 2  s .  c o  m*/
        loginCallbackHandler = (LoginCallbackHandler) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + "must implement LoginCallbackHandler");
    }
}

From source file:ca.ualberta.cmput301.t03.trading.TradeOfferHistoryFragment.java

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

From source file:com.java_lang_programming.android_recycleview_demo.ui.AutoScrollRecyclerViewFragment.java

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

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

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//w  w  w. j a v  a2 s .  co  m
        galleryListFragmentListener = (GalleryListFragmentListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement OnGalleryFragmentInteractionListener");
    }
}

From source file:org.sensapp.android.sensappdroid.fragments.CompositeListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from   w ww  .  j a v a  2  s  .  c  o m
        compositeSelectedListener = (OnCompositeSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnMeasureSelectedListener");
    }
}

From source file:com.baasbox.android.samples.aloa.activities.SendTargetFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from w w w  .j av a2s.c  om*/
        mListener = (OnTargetSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener");
    }
}