diff --git a/app/src/main/java/com/github/libretube/ui/dialogs/SubmitSegmentDialog.kt b/app/src/main/java/com/github/libretube/ui/dialogs/SubmitSegmentDialog.kt index a7b642a5a..7754a1fa7 100644 --- a/app/src/main/java/com/github/libretube/ui/dialogs/SubmitSegmentDialog.kt +++ b/app/src/main/java/com/github/libretube/ui/dialogs/SubmitSegmentDialog.kt @@ -5,9 +5,9 @@ import android.os.Bundle import android.text.format.DateUtils import android.util.Log import android.widget.Toast +import androidx.core.view.isGone import androidx.fragment.app.DialogFragment import androidx.lifecycle.lifecycleScope -import com.github.libretube.BuildConfig import com.github.libretube.R import com.github.libretube.api.JsonHelper import com.github.libretube.api.RetrofitInstance @@ -148,7 +148,7 @@ class SubmitSegmentDialog : DialogFragment() { val binding = _binding ?: return@withContext if (segments.isEmpty()) { - dismiss() + binding.voteSegmentContainer.isGone = true Toast.makeText(context, R.string.no_segments_found, Toast.LENGTH_SHORT).show() return@withContext } diff --git a/app/src/main/res/layout/dialog_submit_segment.xml b/app/src/main/res/layout/dialog_submit_segment.xml index 1f48697be..8e2474d75 100644 --- a/app/src/main/res/layout/dialog_submit_segment.xml +++ b/app/src/main/res/layout/dialog_submit_segment.xml @@ -7,111 +7,127 @@ android:paddingHorizontal="15dp" android:paddingTop="15dp"> - - + android:orientation="vertical"> - + android:text="@string/sb_create_segment" + android:textSize="24sp" /> - - - - + android:baselineAligned="false" + android:orientation="horizontal"> - - + android:layout_weight="1" + android:hint="@string/start_time"> + + + + + + + + + + + + + + - - - - - + android:orientation="vertical"> - + - + - + android:layout_gravity="end" + android:orientation="horizontal"> - + + + + + + + + + android:layout_gravity="end" + android:drawableStart="@drawable/ic_copy" + android:text="@string/vote_for_segment" /> - - - - - + \ No newline at end of file