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.android.contacts.preference.DisplayOptionsPreferenceFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from w  w w  .  j a  v a2  s .  c om
        mListener = (ProfileListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement ProfileListener");
    }
}

From source file:info.wncwaterfalls.app.InformationListFragment.java

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

    // Make sure the containing activity implements the search listener interface
    try {/*from ww w  .  jav  a 2s.c o m*/
        sQueryListener = (OnWaterfallQueryListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnWaterfallQueryListener");
    }
}

From source file:com.ubundude.timesheet.MainUIFragment.java

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

    /** Attaches the callback interfaces to the activity */
    try {/*from  w w  w.j  ava 2 s.  com*/
        mCallback = (OnDateSetListener) act;
    } catch (ClassCastException e) {
        throw new ClassCastException(act.toString() + " must implement OnDateSetListener");
    }
    dbHelp = new TimesheetDatabaseHelper(getActivity());
}

From source file:com.zion.htf.ui.fragment.ArtistDetailsFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//w  ww. j  a va 2s.  c o  m
        this.artistFavoriteStatusChangedListener = (OnArtistFavoriteStatusChangedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnArticleSelectedListener");
    }
}

From source file:com.dazone.crewchat.libGallery.fragment.VideoFragment.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  a  va2  s  . com*/
        mCallback = (OnVideoSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnVideoSelectedListener");
    }
}

From source file:com.androzic.waypoint.WaypointDetails.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 .jav a 2s.co  m
        fragmentHolderCallback = (FragmentHolder) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement FragmentHolder");
    }
    try {
        waypointActionsCallback = (OnWaypointActionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnWaypointActionListener");
    }
}

From source file:com.xamoom.android.xamoomcontentblocks.XamoomMapFragment.java

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

    Activity activity;
    if (context instanceof Activity) {
        activity = (Activity) context;/*from w ww.j a v  a2s.  c  om*/

        try {
            mListener = (XamoomContentFragment.OnXamoomContentFragmentInteractionListener) activity;
        } catch (ClassCastException e) {
            throw new ClassCastException(
                    activity.toString() + " must implement OnXamoomContentFragmentInteractionListener");
        }
    }
}

From source file:com.dabay6.libraries.androidshared.ui.fragments.LoadingFragment.java

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

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

From source file:com.androzic.track.TrackList.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  a 2s. c  o  m
        trackActionsCallback = (OnTrackActionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnTrackActionListener");
    }
}

From source file:io.mpos.ui.acquirer.view.LoginFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//  ww  w. j a va 2 s  . c o m
        activity.setTitle(R.string.MPUPrinting);
        mInteractionActivity = (Interaction) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement LoginFragment.Interaction");
    }
}