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.syncedsynapse.kore2.ui.TVShowListFragment.java

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

From source file:com.yairkukielka.feedhungry.EntryListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    if (activity instanceof MainActivity) {
        MainActivity act = (MainActivity) activity;
        act.setEntriesFragment(this);
    } else {/*www  .j  a  v a2 s. c  o m*/
        throw new ClassCastException(activity.toString() + " must be MainActivity");
    }
}

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

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    Log.d(TAG, "onAttach()");
    try {/*  ww  w.ja  v a2s. c  o m*/
        mActivity = (OpenHABMainActivity) activity;
        mAsyncHttpClient = mActivity.getAsyncHttpClient();
        mActivity.setTitle(R.string.app_discovery);
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must be OpenHABMainActivity");
    }
}

From source file:com.example.user.lstapp.CreatePlaceFragment.java

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

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

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

From source file:cat.wuyingren.rorhelper.fragments.dialogs.ManageSenatorDialogFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    // Verify that the host activity implements the callback interface
    try {// ww w  .ja  v a  2s .c  o  m
        // Instantiate the NoticeDialogListener so we can send events to the host
        mListener = (ManageSenatorDialogListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        throw new ClassCastException(activity.toString() + " must implement ManageSenatorDialogListener");
    }
}

From source file:com.mifos.mifosxdroid.online.loanaccountsummary.LoanAccountSummaryFragment.java

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

From source file:com.cerema.cloud2.ui.dialog.SamlWebViewDialog.java

@Override
public void onAttach(Activity activity) {
    Log_OC.v(TAG, "onAttach");
    super.onAttach(activity);
    try {//w  ww .j  a  va 2 s .com
        mSsoWebViewClientListener = (SsoWebViewClientListener) activity;
        mHandler = new Handler();
        mWebViewClient = new SsoWebViewClient(activity, mHandler, mSsoWebViewClientListener);

    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + SsoWebViewClientListener.class.getSimpleName());
    }
}

From source file:com.digitalarx.android.ui.dialog.SamlWebViewDialog.java

@Override
public void onAttach(Activity activity) {
    Log_OC.d(TAG, "onAttach");
    super.onAttach(activity);
    try {/*from   w  w w  .  j a v a2s  . co  m*/
        mSsoWebViewClientListener = (SsoWebViewClientListener) activity;
        mHandler = new Handler();
        mWebViewClient = new SsoWebViewClient(activity, mHandler, mSsoWebViewClientListener);

    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + SsoWebViewClientListener.class.getSimpleName());
    }
}

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

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

    // Make sure the containing activity implements the downloader listener interface
    try {//from  w  w w  .ja  va 2s.  co  m
        sExpansionFilesDownloadListener = (OnExpansionFilesDownloadListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnExpansionFilesDownloadListener");
    }

}