List of usage examples for android.app Activity toString
@Override
public String toString()
From source file:org.jamienicol.episodes.ShowsListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from ww w. j a v a 2s . c o m onShowSelectedListener = (OnShowSelectedListener) activity; } catch (ClassCastException e) { final String message = String.format("%s must implement OnShowSelectedListener", activity.toString()); throw new ClassCastException(message); } }
From source file:br.liveo.ndrawer.ui.fragment.MainFragment32.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. ja v a2 s .c o m mCallback = (OnMainFragment32SelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnMainFragment32SelectedListener"); } }
From source file:net.simonvt.cathode.ui.fragment.EpisodeFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// w w w .j a v a 2s .com navigationListener = (NavigationClickListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement NavigationClickListener"); } }
From source file:com.tozny.e3dbtest.BaseFragment.java
@SuppressLint("RestrictedApi") @Override/*from w ww . java 2s.c o m*/ public void onAttach(Activity activity) { super.onAttach(activity); try { mListener = (FragmentInteractionListener) activity; if (isMenuVisible() && getArguments() != null) mListener.setActionBarTitle(getArguments().getString(ARG_PARAM2)); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } }
From source file:org.gnucash.android.ui.transaction.TransactionsListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from ww w.j a v a2 s .c o m*/ mTransactionEditListener = (OnTransactionClickedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnAccountSelectedListener"); } }
From source file:org.flerda.android.honeypad.NoteListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// w ww . j av a2 s.c o m // check that the containing activity implements our callback mContainerCallback = (NoteListEventsCallback) activity; } catch (ClassCastException e) { activity.finish(); throw new ClassCastException(activity.toString() + " must implement NoteSelectedCallback"); } }
From source file:com.appnexus.opensdkapp.SettingsFragment.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 w w w. ja v a2s. c o m*/ callback = (OnLoadAdClickedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnLoadAdClickedListener"); } }
From source file:com.luan.thermospy.android.fragments.temperaturelog.TemperatureGraph.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// w w w. j a v a2 s. c o m mListener = (OnTemperatureGraphFragmentListener) activity; mRequestQueue = Coordinator.getInstance().getRequestQueue(); mGetTemperatureEntryListReq = new GetTemperatureEntryListReq(mRequestQueue, this); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } }
From source file:com.ntsync.android.sync.activities.CreatePwdProgressDialog.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// ww w . j av a2 s. c om resultListener = (CreatePwdDialogListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception ClassCastException ex = new ClassCastException( activity.toString() + " must implement CreatePwdDialogListener"); ex.initCause(e); throw ex; } }
From source file:com.fitgoose.fitgoosedemo.SimplePhotoGalleryListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//w w w .j a v a 2 s .com mListener = (OnFragmentInteractionListener) activity; // Show a progress dialog. mLoadingProgressDialog = new ProgressDialog(getActivity()); mLoadingProgressDialog.setMessage("Loading Photos..."); mLoadingProgressDialog.setCancelable(true); mLoadingProgressDialog.show(); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } }