@Override public void onAttach(Activity activity) { super.onAttach(activity); try{ activityCommander = (TopSectionListener) activity; }catch (ClassCastException e){ throw new ClassCastException(activity.toString()); } }
i want to know how an activity calls onAttach of fragment , so that fragment comes to know by which activity it is called or attached to ?
Aucun commentaire:
Enregistrer un commentaire