最高优先级任务功能实现,demo修改
This commit is contained in:
@@ -35,12 +35,18 @@
|
||||
android:layout_below="@+id/name"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_below="@+id/task"
|
||||
android:background="@android:color/darker_gray"
|
||||
/>
|
||||
|
||||
<android.support.v7.widget.RecyclerView
|
||||
android:id="@+id/list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/task"
|
||||
android:layout_margin="16dp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
63
app/src/main/res/layout/dialog_msg.xml
Normal file
63
app/src/main/res/layout/dialog_msg.xml
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<data>
|
||||
<variable
|
||||
name="title"
|
||||
type="java.lang.String"
|
||||
/>
|
||||
<variable
|
||||
name="msg"
|
||||
type="java.lang.String"
|
||||
/>
|
||||
</data>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/background_color"
|
||||
android:gravity="center|left"
|
||||
android:maxHeight="400dp"
|
||||
android:padding="8dp"
|
||||
android:text="@{title}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="22sp"
|
||||
/>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxHeight="400dp"
|
||||
>
|
||||
<TextView
|
||||
android:id="@+id/msg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center_vertical|left"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
android:text="@{msg}"
|
||||
android:textColor="#000"
|
||||
android:textSize="16sp"
|
||||
/>
|
||||
</ScrollView>
|
||||
|
||||
<Button
|
||||
android:id="@+id/enter"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="确定"
|
||||
style="?buttonBarButtonStyle"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -2,7 +2,10 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="8dp"
|
||||
>
|
||||
|
||||
<RelativeLayout
|
||||
@@ -45,8 +48,8 @@
|
||||
android:id="@+id/speed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignRight="@+id/progressBar"
|
||||
android:layout_alignTop="@+id/fileSize"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:text="0kb/s"
|
||||
android:textColor="@color/black"
|
||||
/>
|
||||
@@ -55,8 +58,9 @@
|
||||
android:id="@+id/del"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignRight="@+id/progressBar"
|
||||
android:layout_alignTop="@+id/fileSize"
|
||||
android:layout_marginLeft="18dp"
|
||||
android:layout_toRightOf="@+id/progressBar"
|
||||
android:text="删除"
|
||||
android:textColor="@color/bt_selector_cancel"
|
||||
/>
|
||||
@@ -67,7 +71,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/bar"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="name"
|
||||
/>
|
||||
|
||||
@@ -76,7 +80,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/name"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -84,7 +90,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/download_url"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="5dp"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
21
app/src/main/res/menu/menu_highest_priority.xml
Normal file
21
app/src/main/res/menu/menu_highest_priority.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/add_task"
|
||||
android:icon="@mipmap/ic_add_black_48dp"
|
||||
android:orderInCategory="80"
|
||||
android:title="添加一组任务"
|
||||
app:showAsAction="ifRoom"
|
||||
/>
|
||||
|
||||
<item
|
||||
android:id="@+id/help"
|
||||
android:icon="@mipmap/ic_help_black_48dp"
|
||||
android:orderInCategory="90"
|
||||
android:title="最高优先级任务介绍"
|
||||
app:showAsAction="ifRoom"
|
||||
/>
|
||||
|
||||
</menu>
|
||||
BIN
app/src/main/res/mipmap-mdpi/ic_add_black_48dp.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/ic_add_black_48dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 199 B |
BIN
app/src/main/res/mipmap-mdpi/ic_help_black_48dp.png
Normal file
BIN
app/src/main/res/mipmap-mdpi/ic_help_black_48dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 578 B |
@@ -32,4 +32,16 @@
|
||||
<item>http://rs.0.gaoshouyou.com/d/e7/3d/73e716d3353de5b479fcf7da8d36a5ef.apk</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="highest_names">
|
||||
<item>豪门足球风云</item>
|
||||
<item>碧蓝航线</item>
|
||||
<item>天龙八部手游</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="highest_urls">
|
||||
<item>https://res5.d.cn/6f78ee3bcfdd033e0193c05c74acd280a32d5c1d8da7a68963da81a1403751e88e8f115ea475566c54456b74d82098c836577f54711a35bbb149e0bd88dc15c48845327fae8652cc.apk</item>
|
||||
<item>https://res5.d.cn/6f78ee3bcfdd033e1861859eaef45235b089f60f2e08c0e0e4fc8959d94de1e358a5149b4bec8519eabc62a53eebea280a05ef2d902d3153ae1dec4cb07b505e90a9f50af7dd14c4.apk</item>
|
||||
<item>https://res5.d.cn/6f78ee3bcfdd033ef8e38596afb298d87de07e5f0f1f91f22acd57750f8ae68270531e2b266ea41c86cd196da839a0afef1952dde89773c7e26b9019249503174ca0513fa0a36a6472c4202bbf94da382964a0478471b753ebd95b67aac7ad89.apk</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user