使用slider替换seekbar
This commit is contained in:
1 parent
3f0e630ed3
commit
ad1e83b959
6 files changed
+114
-238
No files matched your search
@@ -4,10 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="6dp"
|
||||
android:paddingBottom="6dp"
|
||||
android:padding="16dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
@@ -19,33 +16,31 @@
|
||||
android:id="@+id/ll_tts_SpeechRate"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_read_speed_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/auto_page_speed"
|
||||
android:textColor="@color/primaryText"
|
||||
android:textSize="14sp" />
|
||||
style="@style/ChapterNameText"
|
||||
android:text="@string/auto_page_speed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_read_speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<io.legato.kazusa.lib.theme.view.ThemeSlider
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/seek_auto_read"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:valueFrom="1.0"
|
||||
android:valueTo="10.0"
|
||||
android:valueTo="60.0"
|
||||
android:stepSize="1.0"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
@@ -53,158 +48,65 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!--目录按钮-->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_catalog"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/chapter_list"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="7dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_catalog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/chapter_list"
|
||||
android:src="@drawable/ic_toc"
|
||||
app:tint="@color/primaryText"
|
||||
tools:ignore="NestedWeights" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_catalog"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/chapter_list"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/primaryText"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_catalog"
|
||||
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2" />
|
||||
<!--调节按钮-->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_main_menu"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/read_aloud"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="7dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:icon="@drawable/ic_toc"
|
||||
android:text="@string/chapter_list"
|
||||
android:textSize="12sp"
|
||||
android:padding="0dp"
|
||||
app:iconGravity="textTop"
|
||||
app:iconPadding="4dp"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_main_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/main_menu"
|
||||
android:src="@drawable/ic_menu"
|
||||
app:tint="@color/primaryText"
|
||||
tools:ignore="NestedWeights" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_main_menu"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/main_menu"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/primaryText"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_main_menu"
|
||||
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2" />
|
||||
<!--界面按钮-->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_auto_page_stop"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/stop"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="7dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:icon="@drawable/ic_menu"
|
||||
android:text="@string/main_menu"
|
||||
android:textSize="12sp"
|
||||
android:padding="0dp"
|
||||
app:iconGravity="textTop"
|
||||
app:iconPadding="4dp"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_auto_page_stop"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/stop"
|
||||
android:src="@drawable/ic_auto_page_stop"
|
||||
app:tint="@color/primaryText"
|
||||
tools:ignore="NestedWeights" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_auto_page_stop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/stop"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/primaryText"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_auto_page_stop"
|
||||
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2" />
|
||||
<!--设置按钮-->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_setting"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="?android:attr/selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:contentDescription="@string/setting"
|
||||
android:focusable="true"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="7dp">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:icon="@drawable/ic_auto_page_stop"
|
||||
android:text="@string/stop"
|
||||
android:textSize="12sp"
|
||||
android:padding="0dp"
|
||||
app:iconGravity="textTop"
|
||||
app:iconPadding="4dp"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_setting"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:contentDescription="@string/aloud_config"
|
||||
android:src="@drawable/ic_settings"
|
||||
app:tint="@color/primaryText"
|
||||
tools:ignore="NestedWeights" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_setting"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/setting"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/primaryText"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_setting"
|
||||
style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:icon="@drawable/ic_settings"
|
||||
android:text="@string/setting"
|
||||
android:textSize="12sp"
|
||||
android:padding="0dp"
|
||||
app:iconGravity="textTop"
|
||||
app:iconPadding="4dp"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in new issue
Block a user