List of usage examples for android.app Activity toString
@Override
public String toString()
From source file:com.example.deer.boochat.chat_room.BluetoothChatFragment.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 va 2s . co m mCallback = (OnChatListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener"); } }
From source file:com.shalzz.attendance.fragment.CaptchaDialogFragment.java
@Override public void onAttach(Activity activity) { mContext = activity;//from w w w.ja v a 2s. c o m super.onAttach(activity); // Verify that the host activity implements the callback interface try { // Instantiate the CaptchaDialogListener so we can send events to the host mListener = (CaptchaDialogListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception throw new ClassCastException(activity.toString() + " must implement CaptchaDialogListener"); } }
From source file:info.wncwaterfalls.app.InformationMapFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); // Make sure the containing activity implements the search listener interface try {/*from w w w. ja v a 2 s. c o m*/ sQueryListener = (OnWaterfallQueryListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement the correct query listeners."); } }
From source file:com.doplgangr.secrecy.settings.SettingsFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w w w. j av a 2 s . co m*/ mFinishListener = (VaultsListFragment.OnFragmentFinishListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement Listener"); } }
From source file:com.ntsync.android.sync.activities.ImportProgressDialog.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/* w w w. ja v a 2 s . c om*/ resultListener = (ImportDialogListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception ClassCastException ex = new ClassCastException( activity.toString() + " must implement ImportDialogListener"); ex.initCause(e); throw ex; } }
From source file:com.juick.android.TagsFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/* www. ja v a 2 s .c o m*/ parentActivity = (TagsFragmentListener) activity; sp = activity.getPreferences(Activity.MODE_PRIVATE); if (saveMineAll) showMine = sp.getBoolean("showMine", true); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement TagsFragmentListener"); } }
From source file:li.barter.fragments.NavDrawerFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); if (!(activity instanceof INavDrawerActionCallback)) { throw new IllegalArgumentException( "Activity " + activity.toString() + " must implement INavDrawerActionCallback"); }/*from w ww .j ava 2 s . co m*/ mNavDrawerActionCallback = (INavDrawerActionCallback) activity; }
From source file:inc.bait.jubilee.ui.fragments.ContactsListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// ww w .ja va 2 s. c o m contactsInteractionListener = (OnContactsInteractionListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnContactsInteractionListener"); } }
From source file:nu.firetech.android.pactrack.frontend.ParcelDetailsFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); mDbAdapter = new ParcelDbAdapter(activity); mDbAdapter.open();// w ww. ja va 2s . c o m try { mParent = (ParentActivity) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement ParentActivity"); } }
From source file:com.flowzr.activity.AccountListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/* w w w . j a va 2 s . c o m*/ mListener = (OnAccountSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnArticleSelectedListener"); } }