app/src/main/java/com/example/coursetable/course_event/EventTitleFragment.java
//if mode = 1 coursemode, if mode = 2 datamode
if mode = 1 coursemode, if mode = 2 datamode
if mode = 1 coursemode if mode = 2 datamode
@Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.event_title_frag, container, false);
        RecyclerView eventTitleRecyclerView = (RecyclerView) view.findViewById(R.id.event_title_recycler_view);
        LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
        CourseEdition temp = (CourseEdition)getActivity().getIntent().getSerializableExtra("this_course");
        String temp2 = (String)getActivity().getIntent().getSerializableExtra("thisday");
        if(temp != null){
            courseEdition = temp;
            mode = 1;
        }
        if(temp2 != null){
            thisday = temp2;
            mode = 2;
        }
        eventTitleRecyclerView.setLayoutManager(layoutManager);
        Log.d("Test", "Fragment is created");
        Log.d("Test","17");
        EventAdapter adapter = new EventAdapter(getEvents());
        eventTitleRecyclerView.setAdapter(adapter);
        return view;
    }
@ Nullable @ Override public View onCreateView ( @ NonNull LayoutInflater inflater , @ Nullable ViewGroup container , @ Nullable Bundle savedInstanceState ) { View view = inflater . inflate ( R . layout . event_title_frag , container , false ) ; RecyclerView eventTitleRecyclerView = ( RecyclerView ) view . findViewById ( R . id . event_title_recycler_view ) ; LinearLayoutManager layoutManager = new LinearLayoutManager ( getActivity ( ) ) ; CourseEdition temp = ( CourseEdition ) getActivity ( ) . getIntent ( ) . getSerializableExtra ( "this_course" ) ; String temp2 = ( String ) getActivity ( ) . getIntent ( ) . getSerializableExtra ( "thisday" ) ; if ( temp != null ) { courseEdition = temp ; mode = 1 ; } if ( temp2 != null ) { thisday = temp2 ; mode = 2 ; } eventTitleRecyclerView . setLayoutManager ( layoutManager ) ; Log . d ( "Test" , "Fragment is created" ) ; Log . d ( "Test" , "17" ) ; EventAdapter adapter = new EventAdapter ( getEvents ( ) ) ; eventTitleRecyclerView . setAdapter ( adapter ) ; return view ; }
if mode = 1 coursemode, if mode = 2 datamode
if mode = 1 coursemode if mode = 2 datamode
//Log.d("13723773255",temp2); //Log.d("CCCCCCCCCCheck",temp2); //System.out.println("hhhhhhhhhhhhhhhhh "+thisday); //Log.d("Test", getEvents().toString());