List of usage examples for android.app Activity toString
@Override
public String toString()
From source file:net.niyonkuru.koodroid.ui.UsageFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from w w w. ja v a 2s . c o m mCallBack = (CallBack) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement CallBack type"); } }
From source file:com.inovex.zabbixmobile.activities.fragments.BaseSeverityFilterDetailsFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); Log.d(TAG, "onAttach"); // This makes sure that the container activity has implemented // the callback interface. If not, it throws an exception try {/*from ww w. j av a 2 s . c om*/ mCallbackMain = (OnListItemSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnListItemSelectedListener."); } }
From source file:com.mchp.android.PIC32_BTSK.TextFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); // This checks that the container activity (PIC32_BTSK) has implemented // the OnSendRequestListener interface. If not, it throws an exception. If it // has been implemented, sets mSendRequestCallback to the implementation in the // container activity. try {// w w w.j a v a 2 s . c o m mSendRequestCallback = (OnSendRequestListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnSendRequestListener"); } // This checks that the container activity (PIC32_BTSK) has implemented // the OnTextLogRequestListener interface. If not, it throws an exception. If it // has been implemented, sets mTextLogRequestCallback to the implementation in the // container activity. try { mTextLogRequestCallback = (OnTextLogRequestListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnTextLogRequestListener"); } return; }
From source file:com.vikingbrain.dmt.view.DisplayFragment.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 . j ava2 s .c o m mCallback = (OnCurrentlyAudioPlayingDetectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + " must implement OnCurrentlyAudioPlayingDetectedListener"); } }
From source file:com.example.cuisoap.agrimac.homePage.machineDetail.machineInfoFragment.java
@Override public void onAttach(Context context) { this.context = context; Activity activity = (Activity) context; try {/* www. j a v a2 s .co m*/ mListener = (OnButtonClickListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnButtonClickListener"); } super.onAttach(context); }
From source file:fr.simon.marquis.preferencesmanager.ui.PreferencesFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w ww .java 2 s.co m*/ mListener = (OnPreferenceFragmentInteractionListener) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + " must implement OnPreferenceFragmentInteractionListener"); } }
From source file:org.openhab.habdroid.ui.OpenHABDiscoveryInboxFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); Log.d(TAG, "onAttach()"); try {//from w ww. j a v a 2s . com mActivity = (OpenHABMainActivity) activity; mAsyncHttpClient = mActivity.getAsyncHttpClient(); mActivity.setTitle(R.string.app_discoveryinbox); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must be OpenHABMainActivity"); } }
From source file:mp.paschalis.ChooseLibraryFragment.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 ww . j a v a 2 s . co m mCallback = (OnLibrarySelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnLibrarySelectedListener"); } }
From source file:com.achow101.bitcointalkforum.fragments.UnreadPostListsFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// w w w.j av a 2s. c o m mListener = (OnUnreadListInteraction) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnUnreadListInteraction"); } }
From source file:at.ac.tuwien.detlef.fragments.EpisodeListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w w w. j a va2 s . c o m*/ listener = (OnEpisodeSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(String.format("%s must implement %s", activity.toString(), OnEpisodeSelectedListener.class.getName())); } }