add: support for weekly task

This commit is contained in:
hyb1996
2017-11-28 22:12:48 +08:00
parent 97382965da
commit 0d8f96eff7
5 changed files with 193 additions and 20 deletions

View File

@@ -174,11 +174,81 @@
app:ael_interpolator="fastOutSlowIn"
app:ael_orientation="vertical">
<TimePicker
android:id="@+id/weekly_task_time_picker"
<LinearLayout
android:id="@+id/weekly_task_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:timePickerMode="spinner"/>
android:orientation="vertical">
<TimePicker
android:id="@+id/weekly_task_time_picker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:timePickerMode="spinner"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:orientation="horizontal"
android:weightSum="4">
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/text_day1"/>
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/text_day2"/>
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/text_day3"/>
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/text_day4"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="25dp"
android:orientation="horizontal"
android:weightSum="4">
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/text_day5"/>
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/text_day6"/>
<CheckBox
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/text_day7"/>
</LinearLayout>
</LinearLayout>
</com.github.aakira.expandablelayout.ExpandableRelativeLayout>

View File

@@ -322,4 +322,12 @@
<string name="text_timing">定时</string>
<string name="text_disposable_task_time_before_now">任务时间小于当前时间</string>
<string name="text_next_run_time">下次运行</string>
<string name="text_day1"></string>
<string name="text_day2"></string>
<string name="text_day3"></string>
<string name="text_day4"></string>
<string name="text_day5"></string>
<string name="text_day6"></string>
<string name="text_day7"></string>
<string name="text_weekly_task_should_check_day_of_week">至少选择一周中的一天</string>
</resources>