removed format card title if there are not formats in audio section
This commit is contained in:
parent
5173484573
commit
1ed09133bc
3 changed files with 3 additions and 1 deletions
|
|
@ -131,6 +131,7 @@ class DownloadAudioFragment(private var resultItem: ResultItem, private var curr
|
||||||
val formatCard = view.findViewById<ConstraintLayout>(R.id.format_card_constraintLayout)
|
val formatCard = view.findViewById<ConstraintLayout>(R.id.format_card_constraintLayout)
|
||||||
if (formats.isEmpty()) {
|
if (formats.isEmpty()) {
|
||||||
formatCard.visibility = View.GONE
|
formatCard.visibility = View.GONE
|
||||||
|
view.findViewById<TextView>(R.id.audio_quality_title).visibility = View.GONE
|
||||||
} else {
|
} else {
|
||||||
val chosenFormat = downloadItem.format
|
val chosenFormat = downloadItem.format
|
||||||
uiUtil.populateFormatCard(formatCard, chosenFormat)
|
uiUtil.populateFormatCard(formatCard, chosenFormat)
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/audio_quality_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/audio_quality" />
|
android:text="@string/audio_quality" />
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@
|
||||||
android:entryValues="@array/video_formats"
|
android:entryValues="@array/video_formats"
|
||||||
android:icon="@drawable/ic_video"
|
android:icon="@drawable/ic_video"
|
||||||
app:key="video_quality"
|
app:key="video_quality"
|
||||||
app:summary="Best Quality"
|
app:summary="@string/best_quality"
|
||||||
app:title="@string/video_quality" />
|
app:title="@string/video_quality" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue