List of usage examples for android.app Activity toString
@Override
public String toString()
From source file:com.nearnotes.OverflowDialog.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); // Verify that the host activity implements the callback interface try {//from ww w . ja va 2 s. com mListener = (OverflowDialogListener) activity; // Instantiate the NoticeDialogListener so we can send events to the host } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OverflowDialogListener"); // The activity doesn't implement the interface, throw exception } }
From source file:org.creativecommons.thelist.fragments.AccountFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from www . j a v a2 s. c om mCallback = (AuthListener) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + activity.getString(R.string.login_callback_exception_message)); } }
From source file:it.feio.android.omninotes.utils.date.DatePickerFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); mActivity = (Activity) activity;//from w w w.ja v a2 s . c om if (getArguments().containsKey(DEFAULT_DATE)) { this.defaultDate = getArguments().getLong(DEFAULT_DATE); } try { mListener = (OnDateSetListener) mActivity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnDateSetListener"); } }
From source file:com.LeftFragement.LeftFragment.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 {/*from ww w . java 2s. c o m*/ mCallback = (OnLeftFragmentEventListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener"); } }
From source file:dtu.ds.warnme.app.dialog.LoginDialog.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from w w w. ja va 2s . c o m listener = (LoginDialogListener) activity; } catch (ClassCastException ex) { throw new ClassCastException(activity.toString() + " must implement LoginDialogListener"); } }
From source file:org.androidsoft.app.permission.ui.ApplicationsListFragment.java
/** * {@inheritDoc }/*from www . java2 s . c o m*/ */ @Override public void onAttach(Activity activity) { super.onAttach(activity); try { // check that the containing activity implements our callback mContainerCallback = (AppListEventsCallback) activity; mActivity = activity; } catch (ClassCastException e) { activity.finish(); throw new ClassCastException(activity.toString() + " must implement AppListEventsCallback"); } }
From source file:ca.shoaib.ping.PingListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from ww w.j av a 2 s.c om mPingListCallback = (PingListCallback) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement PingListCallback"); } }
From source file:com.kylebeal.datedialogfragment.example.DateListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/* w ww . ja v a2s. co m*/ //cast the parent activity to a list item selection listener mSelectedListener = (ListItemSelectedListener) activity; } catch (ClassCastException e) { //if the cast fails, yell throw new ClassCastException( activity.toString() + " must implement ListItemSelectedListener in Activity"); } }
From source file:info.wncwaterfalls.app.SearchLocationFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); // Make sure the containing activity implements the search listener interface try {/*from w ww .j a va2s .co m*/ sListener = (OnLocationSearchListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnHikeSearchListener"); } }
From source file:com.owncloud.android.ui.fragment.SearchShareesFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// ww w.ja v a 2s . c om mListener = (OnSearchFragmentInteractionListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } }