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:org.ciasaboark.tacere.activity.fragment.MainSettingsFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {// w  w w  .  j ava  2s. com
        mListener = (OnSelectCalendarsListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement " + OnSelectCalendarsListener.class
                + " to embed this fragment");
    }
}

From source file:com.LiteralWord.Bible.Notes.NoteEditFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from   ww w .j av  a 2s  .  c o  m
        myNoteEditListener = (OnNoteEditListener) activity;
    } catch (ClassCastException e) {
        Log.d(LiteralWord.TAG, TAG + " Bad class");
        throw new ClassCastException(activity.toString() + " must implement OnNoteEditListener");
    }
}

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

@Override
public void onAttach(Activity act) {
    super.onAttach(act);
    Log.d("ListViewFragment", "Is Attached to Activity: " + act.toString());
    // This makes sure that the container activity has implemented
    // the callback interface. If not, it throws an exception
    try {// w w  w.  ja  v a 2 s .c  om
        mCallback = (OnDateGetListener) act;
    } catch (ClassCastException e) {
        throw new ClassCastException(act.toString() + " must implement OnDateGetListener");
    }

    /** Gets the extras from the passed bundle for use by the methods */
    Bundle extras = getArguments();
    lDate = extras.getString(MainActivity.KEY_DATE);
    lReport = extras.getInt(MainActivity.KEY_REPORT);
    dbHelp = new TimesheetDatabaseHelper(getActivity());
}

From source file:com.blogspot.marioboehmer.thingibrowse.fragments.ThingResultListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//  www  .ja v  a2 s . com
        onThingSelectedListener = (OnThingSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnThingSelectedListener");
    }
    try {
        onNetworkErrorListener = (OnNetworkErrorListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnNetworkErrorListener");
    }
    try {
        onNoResultsListener = (OnNoResultsListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnNoResultsListener");
    }
}

From source file:org.commcare.android.framework.WiFiDirectManagementFragment.java

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

From source file:org.scompo.android.fuellogger.FragmentMenu.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 .  ja v  a  2 s. c o  m*/
        mCallBack = (OnMenuButtonClickedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnMenuButtonClickedListener");
    }
}

From source file:com.mstar.tv.tvplayer.philips.option.OptionFirstFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from   w w  w. ja  va 2s .  com
        mCallback = (FirstFragmentSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener");
    }
}

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

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

From source file:com.blogspot.marioboehmer.thingibrowse.fragments.ThingDetailsFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*w  w w  . j  a  va2 s . c o  m*/
        onNetworkErrorListener = (OnNetworkErrorListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnNetworkErrorListener");
    }
}

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

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

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

    // And the select listener interface
    try {
        sSelectListener = (OnWaterfallSelectListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnWaterfallSelectListener");
    }

}