pull/49/head
kunfei 5 years ago
parent 4edf35fc0f
commit 618915bc70
  1. 3
      app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt
  2. 4
      app/src/main/res/layout/activity_audio_play.xml

@ -180,7 +180,8 @@ class AudioPlayActivity : VMBaseActivity<AudioPlayViewModel>(R.layout.activity_a
tv_dur_time.text = DateFormatUtils.format(it.toLong(), "mm:ss") tv_dur_time.text = DateFormatUtils.format(it.toLong(), "mm:ss")
} }
observeEventSticky<Float>(Bus.AUDIO_SPEED) { observeEventSticky<Float>(Bus.AUDIO_SPEED) {
tv_speed.text = String.format("%.1f", it) tv_speed.text = String.format("%.1fX", it)
tv_speed.visible()
} }
} }

@ -33,8 +33,12 @@
android:id="@+id/tv_speed" android:id="@+id/tv_speed"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="16dp"
android:background="@drawable/shape_fillet_btn_press" android:background="@drawable/shape_fillet_btn_press"
android:textColor="@color/md_white_1000" android:textColor="@color/md_white_1000"
android:paddingStart="3dp"
android:paddingEnd="3dp"
android:visibility="invisible"
app:layout_constraintTop_toBottomOf="@id/title_bar" app:layout_constraintTop_toBottomOf="@id/title_bar"
app:layout_constraintRight_toRightOf="parent" /> app:layout_constraintRight_toRightOf="parent" />

Loading…
Cancel
Save