List of usage examples for android.app Activity toString
@Override
public String toString()
From source file:net.niyonkuru.koodroid.ui.OverviewFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from w w w . j a va2s . c om mCallBack = (CallBack) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement CallBack type"); } }
From source file:com.nikhilnayak.games.octoshootar.ui.fragments.InventoryFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof InventoryFragment.Listener) { mListener = (InventoryFragment.Listener) activity; mPlayerProfile = new PlayerProfile(getActivity() .getSharedPreferences(PlayerProfile.SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE)); } else {/*from w w w.j av a 2s . c o m*/ throw new ClassCastException(activity.toString() + " must implement InventoryFragment.Listener"); } if (activity instanceof InventoryCraftListener) { mCraftListener = (InventoryCraftListener) activity; } else { throw new ClassCastException(activity.toString() + " must implement InventoryCraftListener"); } }
From source file:com.citrus.sample.UserManagementFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w ww . j a v a2s . c o m*/ mListener = (UserManagementInteractionListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement UserManagementInteractionListener"); } }
From source file:jp.co.conit.sss.sp.ex1.fragment.MybooksListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from ww w .jav a 2s . co m*/ mOnMypageItemSelectedListener = (OnMypageItemSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnMypageItemSelectedListener"); } }
From source file:com.icareyou.food.ReportViewFragment.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. jav a2s .c o m mCallback = (OnWatchClickedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnHeadlineSelectedListener"); } }
From source file:com.syncedsynapse.kore2.ui.AudioGenresListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from ww w.j a v a 2 s . c o m*/ listenerActivity = (OnAudioGenreSelectedListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnAudioGenreSelectedListener"); } }
From source file:com.loloof64.android.chess_position_manager.file_explorer.ConfirmRemoveElementsDialogFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); // Verify that the host activity implements the callback interface try {/*w w w. j a v a 2 s . c o m*/ // Instantiate the dialogListener so we can send events to the host listener = (ConfirmRemoveElementsListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception throw new ClassCastException(activity.toString() + " must implement ConfirmRemoveElementsListener"); } }
From source file:com.ntsync.android.sync.activities.VerifyPaymentProgressDialog.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w w w . j a v a 2 s. co m*/ resultListener = (VerifyPaymentDialogListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception ClassCastException ex = new ClassCastException( activity.toString() + " must implement VerifyPaymentDialogListener"); ex.initCause(e); throw ex; } }
From source file:cat.wuyingren.rorhelper.fragments.dialogs.NewGameDialogFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); // Verify that the host activity implements the callback interface try {//from www . java 2 s . c o m // Instantiate the NoticeDialogListener so we can send events to the host mListener = (NewGameDialogListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception throw new ClassCastException(activity.toString() + " must implement NewGameDialogListener"); } }
From source file:ch.ccapps.android.zeneggen.fragment.TabSectionListFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); Log.i("TabSectionListFragment", "- OnAttach -"); try {/*from w w w . j a v a 2 s. c om*/ tabSecInterface = ((CustomSectionListInterface<T>) activity).getTabSectionListInterface(); Log.i("TabSectionListFragment", " item Map is:" + itemMap); } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " You must implement CustomSectionListInterface"); } }