parent
b8a86890a7
commit
489f44c0f9
@ -0,0 +1,68 @@ |
||||
/* |
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package com.arialyy.aria.core.inf; |
||||
|
||||
/** |
||||
* Created by Aria.Lao on 2017/7/18. |
||||
* 基础事件 |
||||
*/ |
||||
public interface IEventListener { |
||||
|
||||
/** |
||||
* 预处理,有时有些地址链接比较慢,这时可以先在这个地方出来一些界面上的UI,如按钮的状态 |
||||
*/ |
||||
void onPre(); |
||||
|
||||
/** |
||||
* 预处理完成,准备下载---开始下载之间 |
||||
*/ |
||||
void onPostPre(long fileSize); |
||||
|
||||
/** |
||||
* 开始 |
||||
*/ |
||||
void onStart(long startLocation); |
||||
|
||||
/** |
||||
* 恢复位置 |
||||
*/ |
||||
void onResume(long resumeLocation); |
||||
|
||||
/** |
||||
* 下载监听 |
||||
*/ |
||||
void onProgress(long currentLocation); |
||||
|
||||
/** |
||||
* 停止 |
||||
*/ |
||||
void onStop(long stopLocation); |
||||
|
||||
/** |
||||
* 下载完成 |
||||
*/ |
||||
void onComplete(); |
||||
|
||||
/** |
||||
* 取消下载 |
||||
*/ |
||||
void onCancel(); |
||||
|
||||
/** |
||||
* 下载失败 |
||||
*/ |
||||
void onFail(); |
||||
} |
@ -1,14 +0,0 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical" |
||||
> |
||||
|
||||
<ListView |
||||
android:id="@+id/list" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
/> |
||||
|
||||
</LinearLayout> |
@ -1,51 +0,0 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="match_parent" |
||||
android:orientation="vertical" |
||||
android:padding="16dp" |
||||
> |
||||
|
||||
<CheckBox |
||||
android:id="@+id/checkbox" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignParentRight="true" |
||||
android:layout_centerVertical="true" |
||||
android:clickable="false" |
||||
/> |
||||
|
||||
<ImageView |
||||
android:id="@+id/img" |
||||
android:layout_width="50dp" |
||||
android:layout_height="50dp" |
||||
android:layout_centerVertical="true" |
||||
/> |
||||
|
||||
<TextView |
||||
android:id="@+id/title" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignTop="@+id/img" |
||||
android:layout_marginLeft="10dp" |
||||
android:layout_marginRight="5dp" |
||||
android:layout_toLeftOf="@+id/checkbox" |
||||
android:layout_toRightOf="@+id/img" |
||||
android:ellipsize="end" |
||||
android:maxLines="1" |
||||
android:textSize="18sp" |
||||
android:textStyle="bold" |
||||
/> |
||||
|
||||
<TextView |
||||
android:id="@+id/info" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_alignLeft="@+id/title" |
||||
android:layout_below="@+id/title" |
||||
android:layout_marginRight="5dp" |
||||
android:layout_marginTop="10dp" |
||||
android:layout_toLeftOf="@+id/checkbox" |
||||
/> |
||||
|
||||
</RelativeLayout> |
@ -1,8 +0,0 @@ |
||||
<resources> |
||||
<string name="app_name">Aria</string> |
||||
|
||||
<string name="error_entity_null">下载实体不能为空</string> |
||||
<string name="error_download_url_null">下载链接不能为空</string> |
||||
<string name="error_download_path_null">存储地址不能为空</string> |
||||
<string name="error_file_name_null">文件名不能为空</string> |
||||
</resources> |
Loading…
Reference in new issue