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.irccloud.android.fragment.UsersListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from  w  w  w  .  j a  va 2  s  . c o  m
        mListener = (OnUserSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnUserSelectedListener");
    }
    if (cid == -1) {
        cid = activity.getIntent().getIntExtra("cid", 0);
        channel = activity.getIntent().getStringExtra("name");
    }
}

From source file:fr.forexperts.ui.MarketOverviewFragment.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 {/* ww  w  .ja v  a 2 s .  c  o  m*/
        mCallback = (Callbacks) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement onItemSelect");
    }
}

From source file:net.sourceforge.servestream.fragment.UrlListFragment.java

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

    try {//  w w w  .  ja  v  a2  s  . c o m
        mListener = (BrowseIntentListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement BrowseIntentListener");
    }

    // connect with streams database and populate list
    mStreamdb = new StreamDatabase(getActivity());
}

From source file:org.anhonesteffort.flock.SubscriptionGoogleFragment.java

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

    if (activity instanceof ManageSubscriptionActivity)
        this.subscriptionActivity = (ManageSubscriptionActivity) activity;
    else/*from www .  jav a  2 s  .co m*/
        throw new ClassCastException(activity.toString() + " not what I expected D: !");
}

From source file:com.doplgangr.secrecy.views.VaultsListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from w w w. j  a va 2 s  .com
        mOnVaultSelected = (OnVaultSelectedListener) activity;
        mFinishListener = (OnFragmentFinishListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement Listener");
    }
}

From source file:com.lightstreamer.simple_demo.android.StocksFragment.java

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

    lsClient = StockListDemoApplication.client;
    mainSubscription.setDataAdapter("QUOTE_ADAPTER");
    mainSubscription.setRequestedMaxFrequency("1");
    mainSubscription.setRequestedSnapshot("yes");
    mainSubscription.addListener(mainSubscriptionListener);
    lsClient.addSubscription(mainSubscription);

    // This makes sure that the container activity has implemented
    // the callback interface. If not, it throws an exception.
    try {/*from   w  w w  .  ja  v  a 2 s.c om*/
        listener = (onStockSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener");
    }
}

From source file:com.androzic.route.RouteDetails.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 {// ww  w. jav  a  2 s  .  c  o  m
        fragmentHolderCallback = (FragmentHolder) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement FragmentHolder");
    }
    try {
        routeActionsCallback = (OnRouteActionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnRouteActionListener");
    }
    try {
        waypointActionsCallback = (OnWaypointActionListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnWaypointActionListener");
    }
}

From source file:com.mobileman.moments.android.frontend.fragments.StreamListFragment.java

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

From source file:com.achow101.bitcointalkforum.fragments.BoardTopicFragment.java

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

From source file:cat.wuyingren.rorhelper.fragments.GameListFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    /*((MainActivity) activity).onSectionAttached(
        getArguments().getInt(ARG_SECTION_NUMBER));*/
    // Verify that the host activity implements the callback interface
    try {//from   w  w  w.  j  av  a  2 s  .  c  om
        // Instantiate the NoticeDialogListener so we can send events to the host
        mListener = (GameListFragmentListener) activity;
    } catch (ClassCastException e) {
        // The activity doesn't implement the interface, throw exception
        throw new ClassCastException(activity.toString() + " must implement ScenarioDialogListener");
    }
}