mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
feat(ui): added reset button to subtitle delay (#1040)
This commit is contained in:
parent
aa8972870c
commit
5db541d7cc
3 changed files with 14 additions and 8 deletions
|
@ -14,13 +14,7 @@ import android.os.Bundle
|
|||
import android.provider.Settings
|
||||
import android.text.Editable
|
||||
import android.text.format.DateUtils
|
||||
import android.view.KeyEvent
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MotionEvent
|
||||
import android.view.Surface
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.WindowManager
|
||||
import android.view.*
|
||||
import android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
|
||||
import android.view.animation.AlphaAnimation
|
||||
import android.view.animation.Animation
|
||||
|
@ -50,7 +44,6 @@ import com.lagradost.cloudstream3.ui.settings.Globals
|
|||
import com.lagradost.cloudstream3.ui.settings.Globals.EMULATOR
|
||||
import com.lagradost.cloudstream3.ui.settings.Globals.TV
|
||||
import com.lagradost.cloudstream3.ui.settings.Globals.isLayout
|
||||
import com.lagradost.cloudstream3.ui.settings.SettingsFragment
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.isUsingMobileData
|
||||
import com.lagradost.cloudstream3.utils.DataStoreHelper
|
||||
import com.lagradost.cloudstream3.utils.SingleSelectionHelper.showDialog
|
||||
|
@ -498,6 +491,11 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
|
|||
dialog.dismissSafe(activity)
|
||||
player.seekTime(1L)
|
||||
}
|
||||
resetBtt.setOnClickListener {
|
||||
subtitleDelay = 0
|
||||
dialog.dismissSafe(activity)
|
||||
player.seekTime(1L)
|
||||
}
|
||||
cancelBtt.setOnClickListener {
|
||||
subtitleDelay = beforeOffset
|
||||
dialog.dismissSafe(activity)
|
||||
|
|
|
@ -113,6 +113,13 @@
|
|||
<requestFocus />
|
||||
</com.google.android.material.button.MaterialButton>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/reset_btt"
|
||||
style="@style/BlackButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_gravity="center_vertical|end"
|
||||
android:text="@string/reset_btn" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/cancel_btt"
|
||||
style="@style/BlackButton"
|
||||
|
|
|
@ -767,4 +767,5 @@
|
|||
<string name="music_singlar">Music</string>
|
||||
<string name="audio_book_singular">Audio Book</string>
|
||||
<string name="custom_media_singluar">Media</string>
|
||||
<string name="reset_btn">Reset</string>
|
||||
</resources>
|
Loading…
Reference in a new issue