diff --git a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt index b2f834e1..6c6393cb 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/ui/player/FullScreenPlayer.kt @@ -352,7 +352,9 @@ open class FullScreenPlayer : AbstractPlayerFragment() { val cancelButton = dialog.findViewById(R.id.cancel_btt)!! val input = dialog.findViewById(R.id.subtitle_offset_input)!! val sub = dialog.findViewById(R.id.subtitle_offset_subtract)!! + val subMore = dialog.findViewById(R.id.subtitle_offset_subtract_more)!! val add = dialog.findViewById(R.id.subtitle_offset_add)!! + val addMore = dialog.findViewById(R.id.subtitle_offset_add_more)!! val subTitle = dialog.findViewById(R.id.subtitle_offset_sub_title)!! input.doOnTextChanged { text, _, _, _ -> @@ -381,6 +383,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() { input.text = Editable.Factory.getInstance()?.newEditable(beforeOffset.toString()) val buttonChange = 100L + val buttonChangeMore = 1000L fun changeBy(by: Long) { val current = (input.text?.toString()?.toLongOrNull() ?: 0) + by @@ -390,10 +393,15 @@ open class FullScreenPlayer : AbstractPlayerFragment() { add.setOnClickListener { changeBy(buttonChange) } - + addMore.setOnClickListener { + changeBy(buttonChangeMore) + } sub.setOnClickListener { changeBy(-buttonChange) } + subMore.setOnClickListener { + changeBy(-buttonChangeMore) + } dialog.setOnDismissListener { if (isFullScreenPlayer) diff --git a/app/src/main/res/drawable/ic_baseline_keyboard_arrow_left_24.xml b/app/src/main/res/drawable/ic_baseline_keyboard_arrow_left_24.xml new file mode 100644 index 00000000..ff93af1f --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_keyboard_arrow_left_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/layout/subtitle_offset.xml b/app/src/main/res/layout/subtitle_offset.xml index 823a4cc8..a98fafef 100644 --- a/app/src/main/res/layout/subtitle_offset.xml +++ b/app/src/main/res/layout/subtitle_offset.xml @@ -1,86 +1,118 @@ - + + style="@style/WatchHeaderText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_margin="0dp" + android:paddingTop="10dp" + android:text="@string/subtitle_offset_title" /> + android:id="@+id/subtitle_offset_sub_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:textColor="?attr/grayTextColor" + tools:text="@string/subtitle_offset_extra_hint_none_format" /> + + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + android:id="@+id/subtitle_offset_subtract_more" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="center" + android:layout_weight="1" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:nextFocusRight="@id/subtitle_offset_subtract" + android:padding="10dp" + android:src="@drawable/ic_baseline_keyboard_arrow_left_24" + app:tint="?attr/white" + tools:ignore="ContentDescription" /> + + + + android:id="@+id/subtitle_offset_input" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="20" + android:hint="@string/subtitle_offset_hint" + android:inputType="numberSigned" + tools:ignore="LabelFor" /> + android:id="@+id/subtitle_offset_add" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_gravity="center" + android:layout_weight="1" + android:background="?android:attr/selectableItemBackgroundBorderless" + android:nextFocusRight="@id/subtitle_offset_add_more" + android:padding="10dp" + android:src="@drawable/ic_baseline_add_24" + app:tint="?attr/white" + tools:ignore="ContentDescription" /> + + + + android:layout_width="match_parent" + android:layout_height="60dp" + android:layout_gravity="bottom" + android:gravity="bottom|end" + android:orientation="horizontal"> + android:id="@+id/apply_btt" + style="@style/WhiteButton" + android:layout_width="wrap_content" + android:layout_gravity="center_vertical|end" + android:text="@string/sort_apply" + android:visibility="visible"> + android:id="@+id/cancel_btt" + style="@style/BlackButton" + android:layout_width="wrap_content" + android:layout_gravity="center_vertical|end" + android:text="@string/sort_cancel" />