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.terracom.mumbleclient.servers.ServerEditFragment.java

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

    try {//  ww w  .  jav a  2 s  .co  m
        mDatabaseProvider = (DatabaseProvider) activity;
        mListener = (ServerEditListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement DatabaseProvider and ServerEditListener!");
    }
}

From source file:net.vivekiyer.GAL.CorporateAddressBookFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from  w ww  .  jav  a  2  s  . c om*/
        this.contactListListener = (ContactListListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnContactSelectedListener"); //$NON-NLS-1$
    }
}

From source file:com.dabay6.android.apps.carlog.ui.base.fragments.BaseDetailFragment.java

/**
 * {@inheritDoc}/*from www.  j  a va  2s . co m*/
 */
@Override
public void onAttach(final Activity activity) {
    super.onAttach(activity);

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

From source file:org.spinsuite.bchat.view.FV_ThreadIndex.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {// w ww .  ja v a2  s . c o  m
        m_Callback = (I_BC_FragmentSelect) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement I_BC_FragmentSelect");
    }
}

From source file:br.com.bioscada.apps.biotracks.fragments.ExportDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*  w ww . j  ava2  s  .c  o m*/
        caller = (ExportCaller) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + ExportCaller.class.getSimpleName());
    }
}

From source file:com.example.jacob_ke.myapplication.Fragment_List.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    Log.v(TAG, "onAttach");

    // This makes sure that the container activity has implemented
    // the callback interface. If not, it throws an exception.
    try {//from w  ww  .j a v a2s .  co m
        mCallback = (OnHeadlineSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener");
    }
}

From source file:net.alexjf.tmm.fragments.DateIntervalBarFragment.java

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

From source file:com.nikhilnayak.games.octoshootar.ui.fragments.GameHomeFragment.java

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

From source file:de.lebenshilfe_muenster.uk_gebaerden_muensterland.sign_browser.SignBrowserFragment.java

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

From source file:com.davidmascharka.lips.SelectRoomSizeDialogFragment.java

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

    // Verify the host activity implements the callback interface
    try {//from  www . ja v  a  2 s  .  c  o  m
        // Instantiate the listener so we can send events to the host
        listener = (SelectRoomSizeDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface
        throw new ClassCastException(activity.toString() + "must implement SelectRoomSizeDialogListener");
    }
}