From 62506c7b25e6bd7b056f9cfb516617d8049d4a4e Mon Sep 17 00:00:00 2001 From: Mystery0 Date: Fri, 20 Jul 2018 14:56:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=BB=93=E6=9D=9F=E8=8A=82=E6=AC=A1=E5=A4=A7=E4=BA=8E?= =?UTF-8?q?10=E6=97=B6=EF=BC=8CWeekView=E6=95=B0=E7=BB=84=E8=B6=8A?= =?UTF-8?q?=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/zhuangfei/timetable/view/PerWeekView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/AndroidTimetableView/TimetableView/src/com/zhuangfei/timetable/view/PerWeekView.java b/AndroidTimetableView/TimetableView/src/com/zhuangfei/timetable/view/PerWeekView.java index 91e5dc0..a301241 100644 --- a/AndroidTimetableView/TimetableView/src/com/zhuangfei/timetable/view/PerWeekView.java +++ b/AndroidTimetableView/TimetableView/src/com/zhuangfei/timetable/view/PerWeekView.java @@ -211,6 +211,7 @@ public int[][] getArray(){ Schedule schedule=getDataSource().get(i); start=schedule.getStart(); end=schedule.getStart()+schedule.getStep()-1; + if (end>10) end=10; for(int m=start;m<=end;m++){ arr[m-1][schedule.getDay()-1]=1; } From 728247e7d1764177540f4d55e4f8be7a834c120a Mon Sep 17 00:00:00 2001 From: Mystery0 Date: Fri, 20 Jul 2018 15:00:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=9A=E5=8F=AF=E9=9A=90=E8=97=8FWeekView=E5=B7=A6=E4=BE=A7?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=BD=93=E5=89=8D=E5=91=A8=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/zhuangfei/timetable/view/WeekView.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/AndroidTimetableView/TimetableView/src/com/zhuangfei/timetable/view/WeekView.java b/AndroidTimetableView/TimetableView/src/com/zhuangfei/timetable/view/WeekView.java index b2b31c6..f66a16b 100644 --- a/AndroidTimetableView/TimetableView/src/com/zhuangfei/timetable/view/WeekView.java +++ b/AndroidTimetableView/TimetableView/src/com/zhuangfei/timetable/view/WeekView.java @@ -241,6 +241,14 @@ public void resetBackground(){ layouts.get(curWeek-1).setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.weekview_thisweek)); } + /** + * 隐藏左侧设置当前周的控件 + */ + public WeekView hideLeftLayout(){ + leftlayout.setVisibility(View.GONE); + return this; + } + /** * 设置控件的可见性 * @param isShow true:显示,false:隐藏