子任务管理器

This commit is contained in:
AriaLyy
2017-09-05 18:03:48 +08:00
parent 3b30d31b8e
commit ac99cc581f
33 changed files with 722 additions and 149 deletions

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="100%"
android:duration="100"/>
</set>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:duration="100"
android:toYDelta="100%"/>
</set>

View File

@@ -17,7 +17,7 @@
/>
</data>
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
@@ -27,18 +27,24 @@
<include
layout="@layout/content_single"
android:id="@+id/content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/toolbar"
bind:fileSize="@{fileSize}"
bind:progress="@{progress}"
bind:speed="@{speed}"
/>
<com.arialyy.simple.widget.SubStateLinearLayout
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:id="@+id/child_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/temp"
android:layout_below="@+id/content"
android:paddingLeft="16dp"
android:paddingRight="16dp"
/>
</LinearLayout>
</RelativeLayout>
</layout>

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:padding="16dp"
>
<TextView
android:id="@+id/task_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="任务组:"
/>
<TextView
android:id="@+id/sub_task"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/task_group"
android:layout_marginTop="5dp"
android:text="子任务:"
/>
<com.arialyy.simple.widget.HorizontalProgressBarWithNumber
android:id="@+id/pb"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/sub_task"
android:layout_marginTop="10dp"
android:max="100"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/pb"
android:orientation="horizontal"
>
<Button
android:id="@+id/start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="开始"
style="?buttonBarButtonStyle"
/>
<Button
android:id="@+id/stop"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="停止"
style="?buttonBarButtonStyle"
/>
<Button
android:id="@+id/cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="删除"
style="?buttonBarButtonStyle"
/>
</LinearLayout>
</RelativeLayout>
</layout>

View File

@@ -10,13 +10,13 @@
<include layout="@layout/layout_bar"/>
<Button
android:onClick="onClick"
android:id="@+id/download"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="多任务同时下载"
style="?buttonBarButtonStyle"
/>
android:onClick="onClick"
android:id="@+id/download"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="多任务同时下载"
style="?buttonBarButtonStyle"
/>
</LinearLayout>
</layout>

View File

@@ -49,7 +49,7 @@
<string-array name="group_urls">
<!--<item>https://res5.d.cn/5a6a3384c1b2be1a65d84b914e6a6fef697637578b6db2eb1056d50b09cf1dcf289d4045df7ef95746e498e3d6a848ab84c89b77aa60194e2c48e5a7cb748265.apk</item>-->
<!--<item>https://res5.d.cn/5a6a3384c1b2be1a52034c72752e8475414630ebc69318b84ef584115ebf5eaaab945ae07b7fe3596afc72a7940ff328d4a9553f6ae92d6c09ba4bfb533137f6.apk</item>-->
<!--<item>https://res5.d.cn/5a6a3384c1b2be1a426f06bfc69034d69c44ae1a01da180cab8e59bd1a5e1a784bac46ba0c64579d14f0e80a4ce4f068af89b0369a393456f4f449a8829cad5c.apk</item>-->
<item>https://res5.d.cn/5a6a3384c1b2be1a426f06bfc69034d69c44ae1a01da180cab8e59bd1a5e1a784bac46ba0c64579d14f0e80a4ce4f068af89b0369a393456f4f449a8829cad5c.apk</item>
<item>http://static.gaoshouyou.com/d/12/0d/7f120f50c80d2e7b8c4ba24ece4f9cdd.apk</item>
<item>http://static.ilongyuan.cn/rayark/RayarkFZ_2.0.7.apk</item>
</string-array>
@@ -72,7 +72,7 @@
<string-array name="group_names">
<item>王者荣耀.apk</item>
<item>战斗吧剑灵.apk</item>
<!--<item>天魔幻想.apk</item>-->
<item>天魔幻想.apk</item>
</string-array>
<string-array name="group_names_1">

View File

@@ -22,4 +22,21 @@
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light"/>
<style name="dialogStyle" parent="@android:style/Animation.Dialog">
<item name="@android:windowEnterAnimation">@anim/dialog_enter</item>
<!-- 进入时的动画 -->
<item name="@android:windowExitAnimation">@anim/dialog_exit</item>
<!-- 退出时的动画 -->
</style>
<!-- 对话框样式 -->
<style name="Theme.Light.Dialog" parent="android:style/Theme.Dialog">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:scrollHorizontally">true</item>
</style>
</resources>