List of usage examples for android.app Activity toString
@Override
public String toString()
From source file:com.andryr.musicplayer.fragments.ArtistFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); mThumbWidth = activity.getResources().getDimensionPixelSize(R.dimen.art_thumbnail_size); mThumbHeight = mThumbWidth;// w w w. j a v a2s. c o m try { mActivity = (MainActivity) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } }
From source file:com.achow101.bitcointalkforum.fragments.MessagesFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from w w w . j a v a 2s . c o m*/ mListener = (OnPMInteraction) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnPMInteraction"); } }
From source file:edu.cmu.cylab.starslinger.view.SlingerFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from w ww . j a va2 s. co m mResult = (OnSlingerResultListener) activity; } catch (ClassCastException e) { throw new ClassCastException( activity.toString() + " must implement " + OnSlingerResultListener.class.getSimpleName()); } }
From source file:com.sbhstimetable.sbhs_timetable_android.NoticesFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); IntentFilter i = new IntentFilter(); i.addAction(ApiAccessor.ACTION_NOTICES_JSON); i.addAction(ApiAccessor.ACTION_BELLTIMES_JSON); i.addAction(ApiAccessor.ACTION_TODAY_JSON); if (this.listener == null) { this.listener = new BroadcastListener(this); }/*from w w w .j a v a2s . c om*/ LocalBroadcastManager.getInstance(this.getActivity()).registerReceiver(this.listener, i); try { mListener = (CommonFragmentInterface) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } }
From source file:com.lovejoy777sarootool.rootool.fragments.BrowserFragment.java
@Override public void onAttach(final Activity activity) { super.onAttach(activity); mObserverCache = FileObserverCache.getInstance(); mActionController = new ActionModeController(activity); if (sHandler == null) { sHandler = new Handler(activity.getMainLooper()); }/*from w w w . j a va2s . c om*/ try { mUpdatePathListener = (onUpdatePathListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement mUpdatePathListener"); } }
From source file:jp.co.conit.sss.sp.ex1.fragment.BookPurchaseFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {/*from ww w . j a v a2 s . c om*/ mBillingListener = (BillingListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement BillingListener"); } mSelf = this; }
From source file:com.ichi2.anki.StudyOptionsFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {// w w w .ja va2 s. com mListener = (StudyOptionsListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement StudyOptionsListener"); } }
From source file:com.amazon.appstream.fireclient.ConnectDialogFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); mActivity = activity;/*from w ww .ja va 2s .co m*/ // Verify that the host activity implements the callback interface try { // Instantiate the NoticeDialogListener so we can send events to the host mListener = (ConnectDialogListener) activity; } catch (ClassCastException e) { // The activity doesn't implement the interface, throw exception throw new ClassCastException(activity.toString() + " must implement NoticeDialogListener"); } }
From source file:de.stkl.gbgvertretungsplan.fragments.MainFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); try {//from w w w. j ava 2s .c o m mCallback = (ComInterface) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement ComInterface"); } }
From source file:com.sbhstimetable.sbhs_timetable_android.TimetableFragment.java
@Override public void onAttach(Activity activity) { super.onAttach(activity); IntentFilter i = new IntentFilter(); i.addAction(ApiAccessor.ACTION_TODAY_JSON); i.addAction(ApiAccessor.ACTION_BELLTIMES_JSON); i.addAction(ApiAccessor.ACTION_NOTICES_JSON); if (this.listener == null) { this.listener = new BroadcastListener(this); }/*from ww w .j a v a2 s . c om*/ LocalBroadcastManager.getInstance(this.getActivity()).registerReceiver(this.listener, i); try { mListener = (CommonFragmentInterface) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } }