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.ontheroad.www.googlefragmentsimple.HeadlinesFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    Log.i("TAG", "HeadlinesFragment onAttach:" + activity.getComponentName().toString());
    // 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 2 s  .  co m*/
        //MainActivity
        mCallback = (OnHeadlineSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener");
    }
}

From source file:it.rainbowbreeze.keepmoving.ui.TimetableFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    // Here mFragmentPos is still not available
    mLogManager.d(LOG_TAG, "onAttach to activity " + activity);
    try {/*w w w  .j av a 2  s.com*/
        mListener = (OnFragmentInteractionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener");
    }
}

From source file:com.example.cuisoap.agrimac.homePage.machineDetail.driverInfoFragment.java

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

From source file:com.example.emulator.EmulatorFragment.java

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

From source file:com.inovex.zabbixmobile.activities.fragments.BaseSeverityFilterListPage.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 {/*  www .  j  a v  a 2s  .c o  m*/
        mCallbackMain = (OnListItemSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnListItemSelectedListener.");
    }
}

From source file:com.pdftron.pdf.controls.OutlineDialogFragment.java

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

From source file:com.cuddlesoft.nori.fragment.SearchResultGridFragment.java

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

    // Get a reference to parent activity, making sure that it implements the proper callback interface.
    try {/*from   w  ww .j a va  2  s.com*/
        mListener = (OnSearchResultGridFragmentInteractionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener");
    }
}

From source file:de.lebenshilfe_muenster.uk_gebaerden_muensterland.sign_trainer.AbstractSignTrainerFragment.java

@SuppressWarnings("deprecation") // necessary for API 15!
@Override/*from  w w w.jav  a  2s  .co  m*/
public void onAttach(Activity activity) {
    Log.d(TAG, "onAttach " + hashCode());
    super.onAttach(activity);
    try {
        this.onToggleLearningModeListener = (OnToggleLearningModeListener) activity;
    } catch (ClassCastException ex) {
        throw new ClassCastException(activity.toString() + " must implement OnToggleLearningModeListener");
    }
}

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

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

From source file:org.openhab.habdroid.ui.OpenHABBindingFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    Log.d(TAG, "onAttach()");
    try {/*from  ww w .  ja  va 2 s .  c  om*/
        mActivity = (OpenHABMainActivity) activity;
        mAsyncHttpClient = mActivity.getAsyncHttpClient();
        mActivity.setTitle(R.string.app_bindings);
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must be OpenHABMainActivity");
    }
}