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.royclarkson.springagram.GalleryPhotoListFragment.java

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

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

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from w w w  .jav  a  2 s  .c  om*/
        caller = (ChooseActivityCaller) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + ChooseActivityCaller.class.getSimpleName());
    }
}

From source file:com.shinymayhem.radiopresets.FragmentPlayer.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//w  w w .ja v  a2s . co  m
        // Instantiate the PlayerListener so we can send events to the host
        mListener = (PlayerListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        throw new ClassCastException(activity.toString() + " must implement PlayerListener");
    }
}

From source file:dtu.ds.warnme.app.dialog.RegisterDialog.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from w  ww. jav a2 s  .  com
        listener = (RegisterDialogListener) activity;
    } catch (ClassCastException ex) {
        throw new ClassCastException(activity.toString() + " must implement RegisterDialogListener");
    }
}

From source file:com.dycody.android.idealnote.utils.date.DatePickerDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    if (getArguments().containsKey(DEFAULT_DATE)) {
        this.defaultDate = getArguments().getLong(DEFAULT_DATE);
    }//from  w  ww .  ja v a2  s  .c  o m

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

From source file:com.example.testapplication.DialogLocation.java

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

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

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

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

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

From source file:nu.firetech.android.pactrack.frontend.ParcelIdDialog.java

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

    try {/*from   w  w  w .  ja va  2s .co  m*/
        mParent = (ParentActivity) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement ParentActivity");
    }
}

From source file:at.ac.tuwien.detlef.fragments.PodListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from   www.j a  v  a2s.  co  m
        listener = (OnPodcastSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(String.format("%s must implement %s", activity.toString(),
                OnPodcastSelectedListener.class.getName()));
    }
}