package com.yidianling.course;

import android.support.v4.app.Fragment;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.ydl.ydlcommon.base.BaseActivity;

/**
 * 课程首页Activity（心理课程）
 */
@Route(path = "/course/home")
public class CourseActivity extends BaseActivity {


    @Override
    protected int layoutResId() {
        return R.layout.activity_course;
    }


    @Override
    protected void initDataAndEvent() {
        initTags();
    }


    /**
     * 初始化tab
     */
    private void initTags() {
        Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.content);
        if (fragment == null) {
            fragment = new FlutterCourseHomeFragment();
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.content, fragment)
                    .commit();
        }
    }
}
