|
@@ -18,6 +18,7 @@ import com.chad.library.adapter.base.listener.OnItemClickListener
|
|
|
import com.cooleshow.base.common.WebConstants
|
|
|
import com.cooleshow.base.router.RouterPath
|
|
|
import com.cooleshow.base.ui.fragment.BaseMVPFragment
|
|
|
+import com.cooleshow.base.utils.LogUtils
|
|
|
import com.cooleshow.base.utils.SizeUtils
|
|
|
import com.cooleshow.base.utils.TimeUtils
|
|
|
import com.cooleshow.base.widgets.EmptyViewLayout
|
|
@@ -185,6 +186,15 @@ class CourseTableFragment :
|
|
|
mViewBinding.tvCurrentDate.text = span
|
|
|
}
|
|
|
|
|
|
+ private fun getMonth(year: Int, month: Int): String {
|
|
|
+ var span: String = if (month < 10) {
|
|
|
+ "$year-0$month"
|
|
|
+ } else {
|
|
|
+ "$year-$month";
|
|
|
+ }
|
|
|
+ return span;
|
|
|
+ }
|
|
|
+
|
|
|
override fun onCalendarOutOfRange(calendar: com.haibin.calendarview.Calendar?) {
|
|
|
}
|
|
|
|
|
@@ -225,6 +235,9 @@ class CourseTableFragment :
|
|
|
|
|
|
override fun onMonthChange(year: Int, month: Int) {
|
|
|
setMontAndDay(year, month, day)
|
|
|
+ presenter?.let {
|
|
|
+ presenter.getCourseScheduleDateByMonth(getMonth(year, month))
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
override fun onViewChange(isMonthView: Boolean) {
|
|
@@ -373,7 +386,7 @@ class CourseTableFragment :
|
|
|
ivCancel.setOnClickListener { pvTime.dismiss() }
|
|
|
})
|
|
|
.setLineSpacingMultiplier(2.5f)
|
|
|
- .setType(booleanArrayOf(true, true, true, false, false, false)) // 默认全部显示
|
|
|
+ .setType(booleanArrayOf(true, true, false, false, false, false)) // 默认全部显示
|
|
|
.isCyclic(true) //是否循环滚动
|
|
|
.setOutSideCancelable(true) //点击屏幕,点在控件外部范围时,是否取消显示
|
|
|
.setTextColorCenter(resources.getColor(com.cooleshow.base.R.color.color_1a1a1a)) //设置选中项的颜色
|