feat: 增加整点报时,增加闹钟

This commit is contained in:
tongtong committed 2026-06-01 01:23:35 +08:00
1 parent 1c89943459
commit 1f6832ac17
60 files changed
+71963 -77

No files matched your search

@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".activity.alarm.add.AlarmAddActivity">
<data>
<variable
name="click"
type="com.ttstd.dialer.activity.alarm.add.AlarmAddActivity.BtnClick" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bar"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="@dimen/default_return_icon_size"
android:layout_height="@dimen/default_return_icon_size"
android:layout_marginStart="@dimen/dp_8"
android:onClick="@{click::exit}"
android:src="@drawable/ic_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:onClick="@{click::showTimePicker}"
android:singleLine="true"
android:text="添加闹钟"
android:textColor="@color/black"
android:textSize="@dimen/sp_22"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:onClick="@{click::saveAlarm}"
android:text="保存"
android:textColor="@color/blue"
android:textSize="@dimen/sp_18"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bar">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_16">
<TimePicker
android:id="@+id/timePicker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:format24Hour="HH:mm"
android:timePickerMode="spinner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/etLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:hint="标签(可选)"
android:padding="@dimen/dp_12"
android:textSize="@dimen/sp_16"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/timePicker" />
<TextView
android:id="@+id/tvRepeatTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="重复"
android:textColor="@color/black"
android:textSize="@dimen/sp_16"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/etLabel" />
<RadioGroup
android:id="@+id/rgRepeat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_8"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvRepeatTitle">
<RadioButton
android:id="@+id/rbOnce"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="只响一次"
android:textSize="@dimen/sp_14" />
<RadioButton
android:id="@+id/rbEveryday"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="每天"
android:textSize="@dimen/sp_14" />
<RadioButton
android:id="@+id/rbWeekdays"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="周一至周五"
android:textSize="@dimen/sp_14" />
<RadioButton
android:id="@+id/rbCustom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="自定义"
android:textSize="@dimen/sp_14" />
</RadioGroup>
<TextView
android:id="@+id/tvVibrationTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="振动"
android:textColor="@color/black"
android:textSize="@dimen/sp_16"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/rgRepeat" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/switchVibration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
app:layout_constraintBottom_toBottomOf="@+id/tvVibrationTitle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tvVibrationTitle" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
@@ -7,6 +7,7 @@
android:orientation="vertical">
<TextView
android:id="@+id/tv_alarm_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="闹钟响铃中..."
@@ -0,0 +1,157 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".activity.alarm.edit.AlarmEditActivity">
<data>
<variable
name="click"
type="com.ttstd.dialer.activity.alarm.edit.AlarmEditActivity.BtnClick" />
<variable
name="alarmInfo"
type="com.ttstd.dialer.db.alarm.AlarmInfo" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bar"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="@dimen/default_return_icon_size"
android:layout_height="@dimen/default_return_icon_size"
android:layout_marginStart="@dimen/dp_8"
android:onClick="@{click::exit}"
android:src="@drawable/ic_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:singleLine="true"
android:text="编辑闹钟"
android:textColor="@color/black"
android:textSize="@dimen/sp_22"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_16"
android:onClick="@{click::saveAlarm}"
android:text="保存"
android:textColor="@color/blue"
android:textSize="@dimen/sp_18"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bar">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/dp_16">
<TimePicker
android:id="@+id/timePicker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:format24Hour="HH:mm"
android:timePickerMode="spinner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/etLabel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:hint="标签(可选)"
android:padding="@dimen/dp_12"
android:textSize="@dimen/sp_16"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/timePicker" />
<TextView
android:id="@+id/tvEnabledTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="启用"
android:textColor="@color/black"
android:textSize="@dimen/sp_16"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/etLabel" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/switchEnabled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/tvEnabledTitle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tvEnabledTitle" />
<TextView
android:id="@+id/tvVibrationTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_16"
android:text="振动"
android:textColor="@color/black"
android:textSize="@dimen/sp_16"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvEnabledTitle" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/switchVibration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/tvVibrationTitle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/tvVibrationTitle" />
<Button
android:id="@+id/btnDelete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_32"
android:backgroundTint="@color/red"
android:onClick="@{click::deleteAlarm}"
android:text="删除闹钟"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvVibrationTitle" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".activity.alarm.list.AlarmListActivity">
<data>
<variable
name="click"
type="com.ttstd.dialer.activity.alarm.list.AlarmListActivity.BtnClick" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/bar"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_48"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="@dimen/default_return_icon_size"
android:layout_height="@dimen/default_return_icon_size"
android:layout_marginStart="@dimen/dp_8"
android:onClick="@{click::exit}"
android:src="@drawable/ic_return"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:singleLine="true"
android:text="闹钟"
android:textColor="@color/black"
android:textSize="@dimen/sp_22"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/bar">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="@dimen/dp_64"
android:layout_height="@dimen/dp_64"
android:layout_gravity="bottom|end"
android:layout_marginEnd="@dimen/dp_32"
android:layout_marginBottom="@dimen/dp_32"
android:onClick="@{click::addAlarm}"
android:src="@drawable/ic_add"
app:fabCustomSize="@dimen/dp_64"
app:layout_behavior="com.ttstd.dialer.view.ScrollAwareFABBehavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
@@ -148,11 +148,110 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:onClick="@{click::openTts}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="语音设置"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="@dimen/dp_100"
android:layout_weight="1">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
android:onClick="@{click::openAlarmClock}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="闹钟设置"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="@dimen/dp_100"
android:layout_weight="1">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="0dp"
android:layout_height="@dimen/dp_100"
android:layout_weight="1">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/dp_100"
android:layout_height="@dimen/dp_100"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
@@ -106,6 +106,14 @@
app:enableText="@string/enable_text_default_launcher"
app:optionsText="@string/options_text_default_launcher" />
<com.ttstd.dialer.view.SettingItem
android:id="@+id/si_hourly_chime"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:disableText="@string/disable_text_hourly_chime"
app:enableText="@string/enable_text_hourly_chime"
app:optionsText="@string/options_text_hourly_chime" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_100">
@@ -0,0 +1,130 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".tts.sherpa_onnx.SherpaOnnxTtsActivity">
<TextView
android:id="@+id/sid_label_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sid_label"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/sid"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="0dp"
android:hint="@string/sid_hint"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/sid_label_hint" />
<TextView
android:id="@+id/speed_label_hint"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="@string/speed_label"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/sid" />
<EditText
android:id="@+id/speed"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_marginTop="0dp"
android:hint="@string/speed_hint"
android:gravity="center"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/speed_label_hint" />
<EditText
android:id="@+id/text"
android:inputType="textMultiLine"
android:lines="8"
android:minLines="10"
android:gravity="top|start"
android:maxLines="30"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:scrollbars="vertical"
android:hint="@string/text_hint"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/speed" />
<Button
android:id="@+id/generate"
android:textAllCaps="false"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="4dp"
android:text="@string/generate"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/text" />
<Button
android:id="@+id/play"
android:textAllCaps="false"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="4dp"
android:text="@string/play"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/generate" />
<Button
android:id="@+id/stop"
android:textAllCaps="false"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginTop="4dp"
android:text="@string/stop"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/play" />
<LinearLayout
android:id="@+id/save_share_row"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:orientation="horizontal"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/stop">
<Button
android:id="@+id/save"
android:textAllCaps="false"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1"
android:layout_marginEnd="2dp"
android:text="@string/save" />
<Button
android:id="@+id/share"
android:textAllCaps="false"
android:layout_width="0dp"
android:layout_height="50dp"
android:layout_weight="1"
android:layout_marginStart="2dp"
android:text="@string/share" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
+2 -2
View File
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".fragment.app.AppFragment">
@@ -18,7 +17,8 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
android:layout_height="match_parent"
android:nestedScrollingEnabled="false" />
</androidx.constraintlayout.widget.ConstraintLayout>
+90
View File
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/hsv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
android:scrollbars="none">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/card_background_color"
android:padding="@dimen/dp_16">
<TextView
android:id="@+id/tv_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="@dimen/sp_36"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_4"
android:textColor="@color/gray"
android:textSize="@dimen/sp_14"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_time" />
<TextView
android:id="@+id/tv_repeat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_2"
android:textColor="@color/gray"
android:textSize="@dimen/sp_12"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_label" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl_operation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/switch_enabled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/ll_delete"
android:layout_width="100dp"
android:layout_height="match_parent"
android:background="@color/red"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="删除"
android:textColor="@color/white"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</HorizontalScrollView>
+4
View File
@@ -44,6 +44,10 @@
<string name="options_text_default_launcher">设置为默认桌面</string>
<string name="enable_text_default_launcher">已设置为默认桌面</string>
<string name="disable_text_default_launcher">未设置为默认桌面</string>
<string name="options_text_hourly_chime">开启整点报时</string>
<string name="enable_text_hourly_chime">已开启,整点时将自动语音报时</string>
<string name="disable_text_hourly_chime">未开启,整点时将自动语音报时</string>
<!--utils end-->
</resources>
+13
View File
@@ -0,0 +1,13 @@
<resources>
<!-- <string name="app_name">TTS</string>-->
<string name="sid_label">Speaker ID</string>
<string name="sid_hint">0</string>
<string name="speed_label">Speech speed (large->fast)</string>
<string name="speed_hint">1.0</string>
<string name="text_hint">Please input your text here</string>
<string name="generate">Generate</string>
<string name="play">Play</string>
<string name="stop">Stop</string>
<string name="save">Save</string>
<string name="share">Share</string>
</resources>
+13 -6
View File
@@ -1,12 +1,12 @@
<resources>
<!-- Base application theme. -->
<!-- <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">-->
<!-- &lt;!&ndash; Customize your theme here. &ndash;&gt;-->
<!-- <item name="colorPrimary">@color/colorPrimary</item>-->
<!-- <item name="colorPrimaryDark">@color/colorPrimaryDark</item>-->
<!-- <item name="colorAccent">@color/colorAccent</item>-->
<!-- </style>-->
<!-- <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">-->
<!-- &lt;!&ndash; Customize your theme here. &ndash;&gt;-->
<!-- <item name="colorPrimary">@color/colorPrimary</item>-->
<!-- <item name="colorPrimaryDark">@color/colorPrimaryDark</item>-->
<!-- <item name="colorAccent">@color/colorAccent</item>-->
<!-- </style>-->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
@@ -17,6 +17,13 @@
</style>
<style name="MaterialTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="backgroundColor">@color/default_background_color</item>
</style>
<style name="AppThemeFitsSystemWindows" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>