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.mozilla.gecko.home.BrowserSearch.java

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

    try {//from  ww  w . ja va  2s.c  o m
        mSearchListener = (OnSearchListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement BrowserSearch.OnSearchListener");
    }

    try {
        mEditSuggestionListener = (OnEditSuggestionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement BrowserSearch.OnEditSuggestionListener");
    }
}

From source file:com.owncloud.android.ui.fragment.FileDetailFragment.java

/**
 * {@inheritDoc}//from   w  w  w .  j av  a 2s  .co m
 */
@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {
        mContainerActivity = (ContainerActivity) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement "
                + FileDetailFragment.ContainerActivity.class.getSimpleName());
    }
}

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

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

From source file:com.vest.album.fragment.CameraBasicFragment.java

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

From source file:edu.chalmers.dat255.audiobookplayer.view.BookshelfFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    boolean ownerImplementsEvents = true;

    try {/*from  w  w w. jav  a2  s  . co  m*/
        fragmentOwner = (IBookshelfGUIEvents) activity;
    } catch (ClassCastException e) {
        ownerImplementsEvents = false;
    }
    if (!ownerImplementsEvents) {
        throw new ClassCastException(
                activity.toString() + " does not implement " + IBookshelfGUIEvents.class.getName());
    }
}

From source file:org.connectbot.ConsoleFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/* www  . ja v a2s .c om*/
        mListener = (ConsoleFragmentContainer) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement ConsoleFragmentContainer");
    }
}

From source file:edu.cmu.cylab.starslinger.view.MessagesFragment.java

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

    try {//  w  ww  .  j av a 2  s  .co  m
        mResult = (OnMessagesResultListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + OnMessagesResultListener.class.getSimpleName());
    }
}

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

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

    try {/*from  ww w  . j a  v a  2  s.  co  m*/
        mListener = (UserCropDialogListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement " + e.getClass().toString());
    }
}

From source file:net.ddns.mlsoftlaberge.trycorder.contacts.ContactsListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*w  ww .  j a va2 s  . c  om*/
        // Assign callback listener which the holding activity must implement. This is used
        // so that when a contact item is interacted with (selected by the user) the holding
        // activity will be notified and can take further action such as populating the contact
        // detail pane (if in multi-pane layout) or starting a new activity with the contact
        // details (single pane layout).
        mOnContactSelectedListener = (OnContactsInteractionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnContactsInteractionListener");
    }
}

From source file:com.irccloud.android.fragment.BuffersListFragment.java

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