Show download size preview

This commit is contained in:
Mauricio Colli 2018-04-08 08:08:19 -03:00
parent 8f73c8c98b
commit 35b3bf2edb
No known key found for this signature in database
GPG key ID: F200BFD6F29DDD85
9 changed files with 454 additions and 216 deletions

View file

@ -35,8 +35,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/file_name"
android:layout_marginLeft="20dp"
android:layout_marginBottom="6dp"
android:layout_marginLeft="20dp"
android:gravity="left"
android:orientation="horizontal"
tools:ignore="RtlHardcoded">
@ -59,12 +59,12 @@
android:id="@+id/quality_spinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minWidth="150dp"
android:layout_below="@+id/video_audio_group"
android:layout_marginBottom="12dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
tools:listitem="@layout/resolutions_spinner_item"/>
android:minWidth="150dp"
tools:listitem="@layout/stream_quality_item"/>
<TextView
android:id="@+id/threads_text_view"
@ -82,8 +82,8 @@
android:layout_below="@+id/threads_text_view"
android:layout_marginLeft="24dp"
android:layout_marginRight="24dp"
android:paddingBottom="12dp"
android:orientation="horizontal">
android:orientation="horizontal"
android:paddingBottom="12dp">
<TextView
android:id="@+id/threads_count"

View file

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="48dp">
<ImageView
android:id="@+id/wo_sound_icon"
android:layout_width="20dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="4dp"
android:scaleType="fitCenter"
android:src="?attr/volume_off"
tools:ignore="ContentDescription,RtlHardcoded"/>
<TextView
android:id="@android:id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_toRightOf="@+id/wo_sound_icon"
android:ellipsize="end"
android:gravity="left"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textSize="14sp"
tools:ignore="RtlHardcoded"
tools:text="MPEG-4 1080p60"/>
</RelativeLayout>

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="48dp">
<ImageView
android:id="@+id/wo_sound_icon"
android:layout_width="20dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="6dp"
android:scaleType="fitCenter"
android:src="?attr/volume_off"
tools:ignore="ContentDescription,RtlHardcoded"/>
<TextView
android:id="@+id/stream_format_name"
android:layout_width="wrap_content"
android:layout_height="22dp"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/wo_sound_icon"
android:ellipsize="end"
android:gravity="left|bottom"
android:maxLines="1"
android:paddingLeft="12dp"
android:paddingRight="18dp"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:textSize="12sp"
tools:ignore="RtlHardcoded"
tools:text="MPEG-4"/>
<TextView
android:id="@+id/stream_quality"
android:layout_width="wrap_content"
android:layout_height="26dp"
android:layout_alignParentBottom="true"
android:layout_toRightOf="@+id/wo_sound_icon"
android:ellipsize="end"
android:gravity="left|top"
android:maxLines="1"
android:paddingLeft="12dp"
android:paddingRight="18dp"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textSize="14sp"
tools:ignore="RtlHardcoded"
tools:text="1080p60"/>
<TextView
android:id="@+id/stream_size"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_alignParentRight="true"
android:gravity="right|center_vertical"
android:maxLines="1"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:textSize="12sp"
android:visibility="gone"
tools:ignore="RtlHardcoded"
tools:text="123.4 MB"
tools:visibility="visible"/>
</RelativeLayout>

View file

@ -180,6 +180,7 @@
<string name="invalid_file">File doesn\'t exist or insufficient permission to read or write to it</string>
<string name="file_name_empty_error">File name cannot be empty</string>
<string name="error_occurred_detail">An error occurred: %1$s</string>
<string name="no_streams_available_download">No streams available to download</string>
<!-- error activity -->
<string name="sorry_string">Sorry, that should not have happened.</string>