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.openhab.habdroid.ui.OpenHABNotificationFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    Log.d(TAG, "onAttach()");
    try {//from   www .  j  a  v a 2s  . c  o m
        mActivity = (OpenHABMainActivity) activity;
        mAsyncHttpClient = mActivity.getAsyncHttpClient();
        mActivity.setTitle(R.string.app_notifications);
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must be OpenHABMainActivity");
    }
}

From source file:com.deliciousdroid.fragment.AddBookmarkFragment.java

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

From source file:br.com.iworkout.dialog.SerieDialog.java

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

From source file:com.akhbulatov.wordkeeper.ui.fragment.CategoryListFragment.java

@SuppressWarnings("deprecation")
@Override/*from  w w w .  j  ava2  s . c  o  m*/
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {
        mListener = (FabAddWordListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(
                activity.toString() + " must implement " + FabAddWordListener.class.getName());
    }
}

From source file:com.ariesmcrae.mymemories.ui.story.CreateStoryFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {/*from   w w  w  .  j ava  2 s.c o  m*/
        mOpener = (OnOpenWindowInterface) activity;
        resolver = new MyMemoriesResolver(activity);
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnOpenWindowListener");
    }
}

From source file:org.akvo.flow.ui.fragment.SurveyListFragment.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 {//w  ww.j a v a  2s  .c o m
        mListener = (SurveyListListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement SurveyListListener");
    }
}

From source file:cz.muni.fi.japanesedictionary.fragments.ResultFragmentList.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    Log.i(LOG_TAG + ": " + mLastTab, "onAttach called");
    try {//  w w  w . j ava  2 s .  c  om
        mCallbackTranslation = (OnTranslationSelectedListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener");
    }
}

From source file:com.microsoft.rightsmanagement.sampleapp.TextEditorFragment.java

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    // This makes sure that the container activity has implemented
    // the callback interface. If not, throw an exception
    try {/*  w ww  .  j av a 2s  .  com*/
        mTextEditorFragmentEventCallback = (TextEditorFragmentEventListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement ITextEditorFragmentEventCallback");
    }
}

From source file:com.ubundude.timesheet.ReportFragment.java

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

    try {//from   w  w  w  .  j  a  va 2s  .c  o m
        mCallback = (OnReportsRunListener) act;
    } catch (ClassCastException e) {
        throw new ClassCastException(act.toString() + " must implement OnDateSetListener");
    }

}

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

@Override
public void onAttach(Activity activity) {
    super.onAttach(activity);
    try {//from w  w  w . jav  a2  s.  c  om
        mListener = (OnPostListener) activity;
    } catch (ClassCastException e) {
        throw new ClassCastException(activity.toString() + " must implement OnPostListener");
    }
}