Code example for Fragment

Methods: getActivitygetArgumentsonResume

0
		return view;
	} 
 
	@Override 
	public void onResume() { 
		super.onResume(); 
		 
		int weekday = this.getArguments().getInt(ARG_SECTION_NUMBER);
		 
		database = new Schedule(this.getActivity(), weekday);
		clearAllCards(); 
		loadCards(); 
	} 
 
	public void clearAllCards(){ 
		cl.removeAllViews();
	} 
	 
	public void loadCards(){ 
		Lesson[] lessons = database.getWeekdayLessons();