mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 13:50:30 +05:30
feat: button to swap sponsorblock segment start and end time
This commit is contained in:
parent
fadd2d31af
commit
801f97353c
@ -57,6 +57,12 @@ class SubmitSegmentDialog : DialogFragment() {
|
||||
|
||||
binding.segmentCategory.items = resources.getStringArray(R.array.sponsorBlockSegmentNames).toList()
|
||||
|
||||
binding.swapTimestamps.setOnClickListener {
|
||||
val temp = binding.startTime.text
|
||||
binding.startTime.text = binding.endTime.text
|
||||
binding.endTime.text = temp
|
||||
}
|
||||
|
||||
lifecycleScope.launch(Dispatchers.IO) {
|
||||
fetchSegments()
|
||||
}
|
||||
|
13
app/src/main/res/drawable/ic_arrow_left_right.xml
Normal file
13
app/src/main/res/drawable/ic_arrow_left_right.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M9.01,14H2v2h7.01v3L13,15l-3.99,-4V14zM14.99,13v-3H22V8h-7.01V5L11,9L14.99,13z" />
|
||||
|
||||
</vector>
|
@ -39,10 +39,20 @@
|
||||
android:inputType="time" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/swap_timestamps"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/ic_arrow_left_right" />
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:hint="@string/end_time">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user