improved download dialog

This commit is contained in:
Bnyro 2022-09-23 14:29:16 +02:00
parent c637a0e106
commit bac4b6ecc3
2 changed files with 8 additions and 9 deletions

View File

@ -34,11 +34,9 @@ class DownloadDialog(
binding.audioRadio.setOnClickListener {
binding.videoSpinner.visibility = View.GONE
binding.audioSpinner.visibility = View.VISIBLE
}
binding.videoRadio.setOnClickListener {
binding.audioSpinner.visibility = View.GONE
binding.videoSpinner.visibility = View.VISIBLE
}

View File

@ -2,7 +2,8 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:paddingHorizontal="20dp">
<TextView
android:id="@+id/title"
@ -16,7 +17,6 @@
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:checkedButton="@id/video_radio"
android:orientation="horizontal">
@ -30,7 +30,7 @@
android:id="@+id/audio_radio"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginStart="20dp"
android:text="@string/audio" />
</RadioGroup>
@ -39,19 +39,20 @@
android:id="@+id/video_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" />
android:layout_marginVertical="10dp" />
<Spinner
android:id="@+id/audio_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:visibility="gone" />
android:layout_marginVertical="10dp" />
<Button
android:id="@+id/download"
style="@style/CustomDialogButton"
android:layout_marginEnd="16dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="15dp"
android:text="@string/download" />
</LinearLayout>