增加获取执行中的任务api

增加获取剩余时间的api
修复重构loader导致的m3u8问题
This commit is contained in:
laoyuyu
2020-01-07 21:56:35 +08:00
parent b1a2f232fa
commit 432ae1c145
37 changed files with 495 additions and 128 deletions

View File

@@ -19,6 +19,10 @@
name="stateStr"
type="String"
/>
<variable
name="timeLeft"
type="String"
/>
</data>
@@ -40,6 +44,7 @@
bind:progress="@{progress}"
bind:speed="@{speed}"
bind:stateStr="@{stateStr}"
bind:timeLeft="@{timeLeft}"
/>
<com.arialyy.simple.widget.SubStateLinearLayout

View File

@@ -105,6 +105,16 @@
style="?buttonBarButtonStyle"
/>
<Button
android:id="@+id/cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:onClick="onClick"
android:text="@string/cancel"
style="?buttonBarButtonStyle"
/>
</LinearLayout>

View File

@@ -33,6 +33,10 @@
name="viewModel"
type="com.arialyy.simple.core.download.SingleTaskActivity"
/>
<variable
name="timeLeft"
type="String"
/>
</data>
<LinearLayout
@@ -74,6 +78,7 @@
bind:progress="@{progress}"
bind:speed="@{speed}"
bind:stateStr="@{stateStr}"
bind:timeLeft="@{timeLeft}"
/>
</LinearLayout>

View File

@@ -13,6 +13,10 @@
name="speed"
type="String"
/>
<variable
name="timeLeft"
type="String"
/>
<variable
name="progress"
type="int"
@@ -64,6 +68,7 @@
android:layout_below="@+id/progressBar"
android:orientation="horizontal"
>
<TextView
android:id="@+id/speed"
android:layout_width="wrap_content"
@@ -74,6 +79,16 @@
android:textColor="@color/black"
/>
<TextView
android:id="@+id/time_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_weight="1"
android:text="@{timeLeft}"
android:textColor="@color/black"
/>
<Button
android:id="@+id/start"
android:layout_width="0dp"