From 3042d06a0e566d94adbada2e7f45c75896ca6eaa Mon Sep 17 00:00:00 2001 From: laoyuyu <511455842@qq.com> Date: Thu, 7 Mar 2019 21:09:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9demo=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../arialyy/aria/core/common/AbsFileer.java | 2 +- .../aria/core/common/AbsThreadTask.java | 5 +- .../com/arialyy/compiler/EventProxyFiler.java | 2 +- app/build.gradle | 1 + app/src/main/AndroidManifest.xml | 26 +-- .../java/com/arialyy/simple/MainActivity.java | 141 ++++++++++++----- .../simple/base/adapter/AbsHolder.java | 4 +- .../core/download/DownloadActivity.java | 148 ++++++++++++++++++ .../{ => core}/download/DownloadDialog.java | 2 +- .../download/DownloadDialogFragment.java | 2 +- .../{ => core}/download/DownloadModule.java | 4 +- .../download/DownloadPopupWindow.java | 2 +- .../download/FtpDownloadActivity.java | 2 +- .../download/HighestPriorityActivity.java | 4 +- .../download/KotlinDownloadActivity.kt | 2 +- .../download/SimpleNotification.java | 2 +- .../download/SingleTaskActivity.java | 7 +- .../fragment_download/DownloadFragment.java | 3 +- .../fragment_download/FragmentActivity.java | 2 +- .../download/group/ChildHandleDialog.java | 2 +- .../download/group/DownloadGroupActivity.java | 2 +- .../group/FTPDirDownloadActivity.java | 2 +- .../download/group/GroupModule.java | 2 +- .../multi_download/DownloadAdapter.java | 2 +- .../multi_download/DownloadNumDialog.java | 2 +- .../multi_download/FileListAdapter.java | 10 +- .../multi_download/FileListEntity.java | 2 +- .../multi_download/MultiDownloadActivity.java | 2 +- .../download/multi_download/MultiEntity.java | 2 +- .../download/multi_download/MultiModule.java | 2 +- .../multi_download/MultiTaskActivity.java | 4 +- .../DownloadNotification.java | 2 +- .../service_download/DownloadService.java | 2 +- .../{ => core}/test/AnyRunActivity.java | 3 +- .../{ => core}/test/TestFTPActivity.java | 6 +- .../{ => core}/test/TestFTPDirActivity.java | 4 +- .../test/TestMutilTaskSysDownload.java | 2 +- .../{ => core}/upload/FtpUploadActivity.java | 3 +- .../{ => core}/upload/HttpUploadActivity.java | 2 +- .../simple/download/DownloadActivity.java | 120 -------------- .../{test => modlue}/AnyRunnModule.java | 28 +++- .../arialyy/simple/modlue/CommonModule.java | 83 ++++++++++ .../java/com/arialyy/simple/to/NormalTo.java | 54 +++++++ app/src/main/res/drawable-v21/item_bg.xml | 11 ++ app/src/main/res/drawable/ic_activity.xml | 4 + app/src/main/res/drawable/ic_del.xml | 4 + app/src/main/res/drawable/ic_fragment.xml | 9 ++ app/src/main/res/drawable/ic_ftp.xml | 6 + app/src/main/res/drawable/ic_ftp_dir.xml | 5 + app/src/main/res/drawable/ic_http.xml | 4 + app/src/main/res/drawable/ic_http_group.xml | 5 + app/src/main/res/drawable/ic_server.xml | 6 + app/src/main/res/drawable/ic_start.xml | 4 + app/src/main/res/drawable/ic_stop.xml | 4 + app/src/main/res/drawable/ic_top.xml | 4 + app/src/main/res/drawable/ic_view.xml | 4 + app/src/main/res/drawable/ic_windows.xml | 7 + app/src/main/res/drawable/item_bg.xml | 7 + .../res/layout/activity_download_mean.xml | 72 +-------- app/src/main/res/layout/activity_fragment.xml | 2 +- app/src/main/res/layout/activity_main.xml | 56 +------ app/src/main/res/layout/activity_single.xml | 2 +- app/src/main/res/layout/content_single.xml | 2 +- app/src/main/res/layout/item_download.xml | 52 ++++++ app/src/main/res/layout/item_main.xml | 32 ++++ app/src/main/res/values/colors.xml | 3 + app/src/main/res/values/dimens.xml | 12 ++ app/src/main/res/values/ids.xml | 28 ++-- app/src/main/res/values/strings.xml | 17 ++ build.gradle | 2 +- 70 files changed, 691 insertions(+), 377 deletions(-) create mode 100644 app/src/main/java/com/arialyy/simple/core/download/DownloadActivity.java rename app/src/main/java/com/arialyy/simple/{ => core}/download/DownloadDialog.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/DownloadDialogFragment.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/DownloadModule.java (97%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/DownloadPopupWindow.java (99%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/FtpDownloadActivity.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/HighestPriorityActivity.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/KotlinDownloadActivity.kt (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/SimpleNotification.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/SingleTaskActivity.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/fragment_download/DownloadFragment.java (97%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/fragment_download/FragmentActivity.java (95%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/group/ChildHandleDialog.java (99%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/group/DownloadGroupActivity.java (99%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/group/FTPDirDownloadActivity.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/group/GroupModule.java (99%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/multi_download/DownloadAdapter.java (99%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/multi_download/DownloadNumDialog.java (97%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/multi_download/FileListAdapter.java (94%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/multi_download/FileListEntity.java (93%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/multi_download/MultiDownloadActivity.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/multi_download/MultiEntity.java (94%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/multi_download/MultiModule.java (93%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/multi_download/MultiTaskActivity.java (97%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/service_download/DownloadNotification.java (96%) rename app/src/main/java/com/arialyy/simple/{ => core}/download/service_download/DownloadService.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/test/AnyRunActivity.java (97%) rename app/src/main/java/com/arialyy/simple/{ => core}/test/TestFTPActivity.java (93%) rename app/src/main/java/com/arialyy/simple/{ => core}/test/TestFTPDirActivity.java (96%) rename app/src/main/java/com/arialyy/simple/{ => core}/test/TestMutilTaskSysDownload.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/upload/FtpUploadActivity.java (98%) rename app/src/main/java/com/arialyy/simple/{ => core}/upload/HttpUploadActivity.java (98%) delete mode 100644 app/src/main/java/com/arialyy/simple/download/DownloadActivity.java rename app/src/main/java/com/arialyy/simple/{test => modlue}/AnyRunnModule.java (73%) create mode 100644 app/src/main/java/com/arialyy/simple/modlue/CommonModule.java create mode 100644 app/src/main/java/com/arialyy/simple/to/NormalTo.java create mode 100644 app/src/main/res/drawable-v21/item_bg.xml create mode 100644 app/src/main/res/drawable/ic_activity.xml create mode 100644 app/src/main/res/drawable/ic_del.xml create mode 100644 app/src/main/res/drawable/ic_fragment.xml create mode 100644 app/src/main/res/drawable/ic_ftp.xml create mode 100644 app/src/main/res/drawable/ic_ftp_dir.xml create mode 100644 app/src/main/res/drawable/ic_http.xml create mode 100644 app/src/main/res/drawable/ic_http_group.xml create mode 100644 app/src/main/res/drawable/ic_server.xml create mode 100644 app/src/main/res/drawable/ic_start.xml create mode 100644 app/src/main/res/drawable/ic_stop.xml create mode 100644 app/src/main/res/drawable/ic_top.xml create mode 100644 app/src/main/res/drawable/ic_view.xml create mode 100644 app/src/main/res/drawable/ic_windows.xml create mode 100644 app/src/main/res/drawable/item_bg.xml create mode 100644 app/src/main/res/layout/item_download.xml create mode 100644 app/src/main/res/layout/item_main.xml diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java b/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java index 511e7f35..8f07090d 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/AbsFileer.java @@ -470,7 +470,7 @@ public abstract class AbsFileer 0 ? temp : 0; } else { tRecord.startLocation = 0; diff --git a/Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java b/Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java index cb2ba003..1e552ae2 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java +++ b/Aria/src/main/java/com/arialyy/aria/core/common/AbsThreadTask.java @@ -100,7 +100,6 @@ public abstract class AbsThreadTask * - * package com.arialyy.simple.download; + * package com.arialyy.simple.core.download; * * import com.arialyy.aria.core.download.DownloadTask; * import com.arialyy.aria.core.scheduler.AbsSchedulerListener; diff --git a/app/build.gradle b/app/build.gradle index 8bdf4834..e27fbfda 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,6 +14,7 @@ android { versionCode 1 versionName "1.0" multiDexEnabled true + vectorDrawables.useSupportLibrary = true } buildTypes { release { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 9b76910c..db48c15c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -29,20 +29,20 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + diff --git a/app/src/main/java/com/arialyy/simple/MainActivity.java b/app/src/main/java/com/arialyy/simple/MainActivity.java index defeb569..7c5743c3 100644 --- a/app/src/main/java/com/arialyy/simple/MainActivity.java +++ b/app/src/main/java/com/arialyy/simple/MainActivity.java @@ -16,66 +16,129 @@ package com.arialyy.simple; +import android.Manifest; +import android.content.Context; import android.content.Intent; +import android.os.Build; import android.os.Bundle; +import android.support.v7.widget.AppCompatImageView; +import android.support.v7.widget.LinearLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.util.Log; import android.view.View; +import android.widget.TextView; +import com.arialyy.frame.permission.OnPermissionCallback; +import com.arialyy.frame.permission.PermissionManager; +import com.arialyy.frame.util.show.T; import com.arialyy.simple.base.BaseActivity; +import com.arialyy.simple.base.adapter.AbsHolder; +import com.arialyy.simple.base.adapter.AbsRVAdapter; +import com.arialyy.simple.base.adapter.RvItemClickSupport; import com.arialyy.simple.databinding.ActivityMainBinding; -import com.arialyy.simple.download.DownloadActivity; -import com.arialyy.simple.download.FtpDownloadActivity; -import com.arialyy.simple.download.group.DownloadGroupActivity; -import com.arialyy.simple.download.group.FTPDirDownloadActivity; -import com.arialyy.simple.upload.FtpUploadActivity; -import com.arialyy.simple.upload.HttpUploadActivity; +import com.arialyy.simple.core.download.DownloadActivity; +import com.arialyy.simple.core.download.FtpDownloadActivity; +import com.arialyy.simple.core.download.group.DownloadGroupActivity; +import com.arialyy.simple.core.download.group.FTPDirDownloadActivity; +import com.arialyy.simple.core.upload.FtpUploadActivity; +import com.arialyy.simple.core.upload.HttpUploadActivity; +import com.arialyy.simple.modlue.CommonModule; +import com.arialyy.simple.to.NormalTo; +import java.util.List; /** * Created by lyy on 2017/3/1. + * 首页 */ -public class MainActivity extends BaseActivity - implements View.OnClickListener { +public class MainActivity extends BaseActivity { + public static final String KEY_MAIN_DATA = "KEY_MAIN_DATA"; @Override protected void init(Bundle savedInstanceState) { super.init(savedInstanceState); setSupportActionBar(mBar); mBar.setTitle("Aria Demo"); getSupportActionBar().setDisplayHomeAsUpEnabled(false); - getBinding().download.setOnClickListener(this); - getBinding().upload.setOnClickListener(this); - getBinding().downloadTaskGroup.setOnClickListener(this); - getBinding().ftpDownload.setOnClickListener(this); - getBinding().ftpDirDownload.setOnClickListener(this); - getBinding().ftpUpload.setOnClickListener(this); - getBinding().kotlinDownload.setOnClickListener(this); + + getBinding().list.setLayoutManager(new LinearLayoutManager(this)); + final List data = getModule(CommonModule.class).getMainData(); + getBinding().list.setAdapter( + new Adapter(this, data)); + RvItemClickSupport.addTo(getBinding().list).setOnItemClickListener( + new RvItemClickSupport.OnItemClickListener() { + @Override public void onItemClicked(RecyclerView recyclerView, int position, View v) { + CommonModule module = getModule(CommonModule.class); + switch (position) { + case 0: + module.startNextActivity(data.get(position), DownloadActivity.class); + break; + case 1: + module.startNextActivity(data.get(position), HttpUploadActivity.class); + break; + case 2: + module.startNextActivity(data.get(position), DownloadGroupActivity.class); + break; + case 3: + module.startNextActivity(data.get(position), FtpDownloadActivity.class); + break; + case 4: + module.startNextActivity(data.get(position), FTPDirDownloadActivity.class); + break; + case 5: + module.startNextActivity(data.get(position), FtpUploadActivity.class); + break; + } + } + }); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + boolean hasPermission = PermissionManager.getInstance() + .checkPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE); + if (!hasPermission) { + PermissionManager.getInstance().requestPermission(this, new OnPermissionCallback() { + @Override public void onSuccess(String... permissions) { + } + + @Override public void onFail(String... permissions) { + T.showShort(MainActivity.this, "没有文件读写权限"); + finish(); + } + }, Manifest.permission.WRITE_EXTERNAL_STORAGE); + } + } } @Override protected int setLayoutId() { return R.layout.activity_main; } - @Override - public void onClick(View view) { - switch (view.getId()) { - case R.id.download: - startActivity(new Intent(this, DownloadActivity.class)); - break; - case R.id.upload: - startActivity(new Intent(this, HttpUploadActivity.class)); - break; - case R.id.download_task_group: - startActivity(new Intent(this, DownloadGroupActivity.class)); - break; - case R.id.ftp_download: - startActivity(new Intent(this, FtpDownloadActivity.class)); - break; - case R.id.ftp_dir_download: - startActivity(new Intent(this, FTPDirDownloadActivity.class)); - break; - case R.id.ftp_upload: - startActivity(new Intent(this, FtpUploadActivity.class)); - break; - case R.id.kotlin_download: - //startActivity(new Intent(this, KotlinDownloadActivity.class)); - break; + private static class Adapter extends AbsRVAdapter { + + Adapter(Context context, List data) { + super(context, data); + } + + @Override protected Holder getViewHolder(View convertView, int viewType) { + return new Holder(convertView); + } + + @Override protected int setLayoutId(int type) { + return R.layout.item_main; + } + + @Override protected void bindData(Holder holder, int position, NormalTo item) { + holder.text.setText(item.title); + Log.d(TAG, item.icon + ""); + holder.image.setImageResource(item.icon); + } + + private static class Holder extends AbsHolder { + TextView text; + AppCompatImageView image; + + Holder(View itemView) { + super(itemView); + text = findViewById(R.id.text); + image = findViewById(R.id.image); + } } } } diff --git a/app/src/main/java/com/arialyy/simple/base/adapter/AbsHolder.java b/app/src/main/java/com/arialyy/simple/base/adapter/AbsHolder.java index 520a09ba..222977cb 100644 --- a/app/src/main/java/com/arialyy/simple/base/adapter/AbsHolder.java +++ b/app/src/main/java/com/arialyy/simple/base/adapter/AbsHolder.java @@ -26,7 +26,7 @@ import android.view.View; * 通用Holder */ public class AbsHolder extends RecyclerView.ViewHolder { - View mView; + private View mView; private SparseArray mViews = new SparseArray<>(); public AbsHolder(View itemView) { @@ -35,7 +35,7 @@ public class AbsHolder extends RecyclerView.ViewHolder { } @SuppressWarnings("unchecked") - public T getView(@IdRes int id) { + public T findViewById(@IdRes int id) { View view = mViews.get(id); if (view == null) { view = mView.findViewById(id); diff --git a/app/src/main/java/com/arialyy/simple/core/download/DownloadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/DownloadActivity.java new file mode 100644 index 00000000..9156047e --- /dev/null +++ b/app/src/main/java/com/arialyy/simple/core/download/DownloadActivity.java @@ -0,0 +1,148 @@ +/* + * 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.simple.core.download; + +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.support.v7.widget.AppCompatImageView; +import android.support.v7.widget.GridLayoutManager; +import android.support.v7.widget.RecyclerView; +import android.util.Log; +import android.view.Gravity; +import android.view.View; +import android.widget.TextView; +import com.arialyy.simple.MainActivity; +import com.arialyy.simple.R; +import com.arialyy.simple.base.BaseActivity; +import com.arialyy.simple.base.adapter.AbsHolder; +import com.arialyy.simple.base.adapter.AbsRVAdapter; +import com.arialyy.simple.base.adapter.RvItemClickSupport; +import com.arialyy.simple.databinding.ActivityDownloadMeanBinding; +import com.arialyy.simple.core.download.fragment_download.FragmentActivity; +import com.arialyy.simple.core.download.multi_download.MultiTaskActivity; +import com.arialyy.simple.core.download.service_download.DownloadService; +import com.arialyy.simple.modlue.CommonModule; +import com.arialyy.simple.to.NormalTo; +import java.util.List; + +/** + * Created by Lyy on 2016/10/13. + */ +public class DownloadActivity extends BaseActivity { + private NormalTo mTo; + + @Override protected int setLayoutId() { + return R.layout.activity_download_mean; + } + + @Override protected void init(Bundle savedInstanceState) { + super.init(savedInstanceState); + mTo = getIntent().getParcelableExtra(MainActivity.KEY_MAIN_DATA); + setTitle(mTo.title); + final List data = getModule(CommonModule.class).getDownloadData(); + getBinding().list.setLayoutManager(new GridLayoutManager(this, 2)); + getBinding().list.setAdapter(new Adapter(this, data)); + RvItemClickSupport.addTo(getBinding().list).setOnItemClickListener( + new RvItemClickSupport.OnItemClickListener() { + @Override public void onItemClicked(RecyclerView recyclerView, int position, View v) { + CommonModule module = getModule(CommonModule.class); + switch (position) { + case 0: + module.startNextActivity(data.get(position), SingleTaskActivity.class); + break; + case 1: + module.startNextActivity(data.get(position), MultiTaskActivity.class); + break; + case 2: + module.startNextActivity(data.get(position), HighestPriorityActivity.class); + break; + case 3: + break; + case 4: + break; + } + } + }); + } + + //public void onClick(View view) { + // switch (view.getId()) { + // case R.id.highest_priority: + // startActivity(new Intent(this, HighestPriorityActivity.class)); + // break; + // case R.id.service: + // startService(new Intent(this, DownloadService.class)); + // break; + // case R.id.single_task: + // startActivity(new Intent(this, SingleTaskActivity.class)); + // break; + // case R.id.multi_task: + // startActivity(new Intent(this, MultiTaskActivity.class)); + // break; + // case R.id.dialog_task: + // DownloadDialog dialog = new DownloadDialog(this); + // + // dialog.show(); + // //DownloadDialogFragment dialog = new DownloadDialogFragment(this); + // //dialog.show(getSupportFragmentManager(), "dialog"); + // break; + // case R.id.pop_task: + // DownloadPopupWindow pop = new DownloadPopupWindow(this); + // pop.showAtLocation(mRootView, Gravity.CENTER_VERTICAL, 0, 0); + // break; + // case R.id.fragment_task: + // startActivity(new Intent(this, FragmentActivity.class)); + // break; + // case R.id.notification: + // //SimpleNotification notification = new SimpleNotification(this); + // //notification.start(); + // break; + // } + //} + + private static class Adapter extends AbsRVAdapter { + + Adapter(Context context, List data) { + super(context, data); + } + + @Override protected Adapter.Holder getViewHolder(View convertView, int viewType) { + return new Adapter.Holder(convertView); + } + + @Override protected int setLayoutId(int type) { + return R.layout.item_download; + } + + @Override protected void bindData(Adapter.Holder holder, int position, NormalTo item) { + holder.text.setText(item.title); + holder.image.setImageResource(item.icon); + } + + private static class Holder extends AbsHolder { + TextView text; + AppCompatImageView image; + + Holder(View itemView) { + super(itemView); + text = findViewById(R.id.title); + image = findViewById(R.id.image); + } + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/arialyy/simple/download/DownloadDialog.java b/app/src/main/java/com/arialyy/simple/core/download/DownloadDialog.java similarity index 98% rename from app/src/main/java/com/arialyy/simple/download/DownloadDialog.java rename to app/src/main/java/com/arialyy/simple/core/download/DownloadDialog.java index 80c9f83b..95ccb348 100644 --- a/app/src/main/java/com/arialyy/simple/download/DownloadDialog.java +++ b/app/src/main/java/com/arialyy/simple/core/download/DownloadDialog.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arialyy.simple.download; +package com.arialyy.simple.core.download; import android.content.Context; import android.os.Environment; diff --git a/app/src/main/java/com/arialyy/simple/download/DownloadDialogFragment.java b/app/src/main/java/com/arialyy/simple/core/download/DownloadDialogFragment.java similarity index 98% rename from app/src/main/java/com/arialyy/simple/download/DownloadDialogFragment.java rename to app/src/main/java/com/arialyy/simple/core/download/DownloadDialogFragment.java index 3aedba63..e60be9df 100644 --- a/app/src/main/java/com/arialyy/simple/download/DownloadDialogFragment.java +++ b/app/src/main/java/com/arialyy/simple/core/download/DownloadDialogFragment.java @@ -1,4 +1,4 @@ -package com.arialyy.simple.download; +package com.arialyy.simple.core.download; import android.annotation.SuppressLint; import android.os.Bundle; diff --git a/app/src/main/java/com/arialyy/simple/download/DownloadModule.java b/app/src/main/java/com/arialyy/simple/core/download/DownloadModule.java similarity index 97% rename from app/src/main/java/com/arialyy/simple/download/DownloadModule.java rename to app/src/main/java/com/arialyy/simple/core/download/DownloadModule.java index defc8d91..441b5a1a 100644 --- a/app/src/main/java/com/arialyy/simple/download/DownloadModule.java +++ b/app/src/main/java/com/arialyy/simple/core/download/DownloadModule.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arialyy.simple.download; +package com.arialyy.simple.core.download; import android.content.Context; import android.content.res.Resources; @@ -23,7 +23,7 @@ import com.arialyy.aria.core.download.DownloadEntity; import com.arialyy.aria.util.CommonUtil; import com.arialyy.simple.R; import com.arialyy.simple.base.BaseModule; -import com.arialyy.simple.download.multi_download.FileListEntity; +import com.arialyy.simple.core.download.multi_download.FileListEntity; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; diff --git a/app/src/main/java/com/arialyy/simple/download/DownloadPopupWindow.java b/app/src/main/java/com/arialyy/simple/core/download/DownloadPopupWindow.java similarity index 99% rename from app/src/main/java/com/arialyy/simple/download/DownloadPopupWindow.java rename to app/src/main/java/com/arialyy/simple/core/download/DownloadPopupWindow.java index d2c4081e..df580a55 100644 --- a/app/src/main/java/com/arialyy/simple/download/DownloadPopupWindow.java +++ b/app/src/main/java/com/arialyy/simple/core/download/DownloadPopupWindow.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arialyy.simple.download; +package com.arialyy.simple.core.download; import android.content.Context; import android.graphics.Color; diff --git a/app/src/main/java/com/arialyy/simple/download/FtpDownloadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadActivity.java similarity index 98% rename from app/src/main/java/com/arialyy/simple/download/FtpDownloadActivity.java rename to app/src/main/java/com/arialyy/simple/core/download/FtpDownloadActivity.java index 74bffff4..fe6fa41f 100644 --- a/app/src/main/java/com/arialyy/simple/download/FtpDownloadActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/FtpDownloadActivity.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arialyy.simple.download; +package com.arialyy.simple.core.download; import android.os.Bundle; import android.util.Log; diff --git a/app/src/main/java/com/arialyy/simple/download/HighestPriorityActivity.java b/app/src/main/java/com/arialyy/simple/core/download/HighestPriorityActivity.java similarity index 98% rename from app/src/main/java/com/arialyy/simple/download/HighestPriorityActivity.java rename to app/src/main/java/com/arialyy/simple/core/download/HighestPriorityActivity.java index 4112b400..e140abe4 100644 --- a/app/src/main/java/com/arialyy/simple/download/HighestPriorityActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/HighestPriorityActivity.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arialyy.simple.download; +package com.arialyy.simple.core.download; import android.os.Bundle; import android.os.Environment; @@ -35,7 +35,7 @@ import com.arialyy.frame.util.show.L; import com.arialyy.simple.R; import com.arialyy.simple.base.BaseActivity; import com.arialyy.simple.databinding.ActivityHighestPriorityBinding; -import com.arialyy.simple.download.multi_download.DownloadAdapter; +import com.arialyy.simple.core.download.multi_download.DownloadAdapter; import com.arialyy.simple.widget.HorizontalProgressBarWithNumber; import java.util.ArrayList; import java.util.HashSet; diff --git a/app/src/main/java/com/arialyy/simple/download/KotlinDownloadActivity.kt b/app/src/main/java/com/arialyy/simple/core/download/KotlinDownloadActivity.kt similarity index 98% rename from app/src/main/java/com/arialyy/simple/download/KotlinDownloadActivity.kt rename to app/src/main/java/com/arialyy/simple/core/download/KotlinDownloadActivity.kt index 0587f32e..59414607 100644 --- a/app/src/main/java/com/arialyy/simple/download/KotlinDownloadActivity.kt +++ b/app/src/main/java/com/arialyy/simple/core/download/KotlinDownloadActivity.kt @@ -1,4 +1,4 @@ -//package com.arialyy.simple.download +//package com.arialyy.simple.core.download // //import android.os.Bundle //import android.os.Environment diff --git a/app/src/main/java/com/arialyy/simple/download/SimpleNotification.java b/app/src/main/java/com/arialyy/simple/core/download/SimpleNotification.java similarity index 98% rename from app/src/main/java/com/arialyy/simple/download/SimpleNotification.java rename to app/src/main/java/com/arialyy/simple/core/download/SimpleNotification.java index 285e066a..3dc7b0c2 100644 --- a/app/src/main/java/com/arialyy/simple/download/SimpleNotification.java +++ b/app/src/main/java/com/arialyy/simple/core/download/SimpleNotification.java @@ -14,7 +14,7 @@ // * limitations under the License. // */ // -//package com.arialyy.simple.download; +//package com.arialyy.simple.core.download; // //import android.app.NotificationManager; //import android.content.Context; diff --git a/app/src/main/java/com/arialyy/simple/download/SingleTaskActivity.java b/app/src/main/java/com/arialyy/simple/core/download/SingleTaskActivity.java similarity index 98% rename from app/src/main/java/com/arialyy/simple/download/SingleTaskActivity.java rename to app/src/main/java/com/arialyy/simple/core/download/SingleTaskActivity.java index 16a17d9c..99e9183a 100644 --- a/app/src/main/java/com/arialyy/simple/download/SingleTaskActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/SingleTaskActivity.java @@ -14,16 +14,12 @@ * limitations under the License. */ -package com.arialyy.simple.download; +package com.arialyy.simple.core.download; import android.content.BroadcastReceiver; -import android.content.ContentResolver; import android.content.Context; import android.content.Intent; -import android.content.IntentFilter; -import android.net.Uri; import android.os.Bundle; -import android.os.Environment; import android.util.Log; import android.view.Menu; import android.view.MenuItem; @@ -34,7 +30,6 @@ import android.widget.Toast; import com.arialyy.annotations.Download; import com.arialyy.aria.core.Aria; -import com.arialyy.aria.core.common.RequestEnum; import com.arialyy.aria.core.download.DownloadTarget; import com.arialyy.aria.core.download.DownloadTask; import com.arialyy.aria.core.inf.IEntity; diff --git a/app/src/main/java/com/arialyy/simple/download/fragment_download/DownloadFragment.java b/app/src/main/java/com/arialyy/simple/core/download/fragment_download/DownloadFragment.java similarity index 97% rename from app/src/main/java/com/arialyy/simple/download/fragment_download/DownloadFragment.java rename to app/src/main/java/com/arialyy/simple/core/download/fragment_download/DownloadFragment.java index e5891113..1117a868 100644 --- a/app/src/main/java/com/arialyy/simple/download/fragment_download/DownloadFragment.java +++ b/app/src/main/java/com/arialyy/simple/core/download/fragment_download/DownloadFragment.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arialyy.simple.download.fragment_download; +package com.arialyy.simple.core.download.fragment_download; import android.os.Bundle; import android.os.Environment; @@ -29,7 +29,6 @@ import com.arialyy.aria.util.CommonUtil; import com.arialyy.frame.core.AbsFragment; import com.arialyy.simple.R; import com.arialyy.simple.databinding.FragmentDownloadBinding; -import com.arialyy.simple.widget.HorizontalProgressBarWithNumber; /** * Created by lyy on 2017/1/4. diff --git a/app/src/main/java/com/arialyy/simple/download/fragment_download/FragmentActivity.java b/app/src/main/java/com/arialyy/simple/core/download/fragment_download/FragmentActivity.java similarity index 95% rename from app/src/main/java/com/arialyy/simple/download/fragment_download/FragmentActivity.java rename to app/src/main/java/com/arialyy/simple/core/download/fragment_download/FragmentActivity.java index 3d0c1344..c06453c1 100644 --- a/app/src/main/java/com/arialyy/simple/download/fragment_download/FragmentActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/fragment_download/FragmentActivity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arialyy.simple.download.fragment_download; +package com.arialyy.simple.core.download.fragment_download; import android.os.Bundle; import com.arialyy.aria.core.Aria; diff --git a/app/src/main/java/com/arialyy/simple/download/group/ChildHandleDialog.java b/app/src/main/java/com/arialyy/simple/core/download/group/ChildHandleDialog.java similarity index 99% rename from app/src/main/java/com/arialyy/simple/download/group/ChildHandleDialog.java rename to app/src/main/java/com/arialyy/simple/core/download/group/ChildHandleDialog.java index 9f865781..b8edaf5c 100644 --- a/app/src/main/java/com/arialyy/simple/download/group/ChildHandleDialog.java +++ b/app/src/main/java/com/arialyy/simple/core/download/group/ChildHandleDialog.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arialyy.simple.download.group; +package com.arialyy.simple.core.download.group; import android.annotation.SuppressLint; import android.content.Context; diff --git a/app/src/main/java/com/arialyy/simple/download/group/DownloadGroupActivity.java b/app/src/main/java/com/arialyy/simple/core/download/group/DownloadGroupActivity.java similarity index 99% rename from app/src/main/java/com/arialyy/simple/download/group/DownloadGroupActivity.java rename to app/src/main/java/com/arialyy/simple/core/download/group/DownloadGroupActivity.java index 206d1c2f..3949fd4a 100644 --- a/app/src/main/java/com/arialyy/simple/download/group/DownloadGroupActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/group/DownloadGroupActivity.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arialyy.simple.download.group; +package com.arialyy.simple.core.download.group; import android.os.Bundle; import android.os.Environment; diff --git a/app/src/main/java/com/arialyy/simple/download/group/FTPDirDownloadActivity.java b/app/src/main/java/com/arialyy/simple/core/download/group/FTPDirDownloadActivity.java similarity index 98% rename from app/src/main/java/com/arialyy/simple/download/group/FTPDirDownloadActivity.java rename to app/src/main/java/com/arialyy/simple/core/download/group/FTPDirDownloadActivity.java index ec6ae131..e8283795 100644 --- a/app/src/main/java/com/arialyy/simple/download/group/FTPDirDownloadActivity.java +++ b/app/src/main/java/com/arialyy/simple/core/download/group/FTPDirDownloadActivity.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arialyy.simple.download.group; +package com.arialyy.simple.core.download.group; import android.os.Bundle; import android.os.Environment; diff --git a/app/src/main/java/com/arialyy/simple/download/group/GroupModule.java b/app/src/main/java/com/arialyy/simple/core/download/group/GroupModule.java similarity index 99% rename from app/src/main/java/com/arialyy/simple/download/group/GroupModule.java rename to app/src/main/java/com/arialyy/simple/core/download/group/GroupModule.java index ad01a50a..97fcf3fe 100644 --- a/app/src/main/java/com/arialyy/simple/download/group/GroupModule.java +++ b/app/src/main/java/com/arialyy/simple/core/download/group/GroupModule.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.arialyy.simple.download.group; +package com.arialyy.simple.core.download.group; import android.content.Context; import com.arialyy.simple.R; diff --git a/app/src/main/java/com/arialyy/simple/download/multi_download/DownloadAdapter.java b/app/src/main/java/com/arialyy/simple/core/download/multi_download/DownloadAdapter.java similarity index 99% rename from app/src/main/java/com/arialyy/simple/download/multi_download/DownloadAdapter.java rename to app/src/main/java/com/arialyy/simple/core/download/multi_download/DownloadAdapter.java index 42849a34..3753286b 100644 --- a/app/src/main/java/com/arialyy/simple/download/multi_download/DownloadAdapter.java +++ b/app/src/main/java/com/arialyy/simple/core/download/multi_download/DownloadAdapter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arialyy.simple.download.multi_download; +package com.arialyy.simple.core.download.multi_download; import android.annotation.SuppressLint; import android.content.Context; diff --git a/app/src/main/java/com/arialyy/simple/download/multi_download/DownloadNumDialog.java b/app/src/main/java/com/arialyy/simple/core/download/multi_download/DownloadNumDialog.java similarity index 97% rename from app/src/main/java/com/arialyy/simple/download/multi_download/DownloadNumDialog.java rename to app/src/main/java/com/arialyy/simple/core/download/multi_download/DownloadNumDialog.java index d13ce092..4a6b8095 100644 --- a/app/src/main/java/com/arialyy/simple/download/multi_download/DownloadNumDialog.java +++ b/app/src/main/java/com/arialyy/simple/core/download/multi_download/DownloadNumDialog.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arialyy.simple.download.multi_download; +package com.arialyy.simple.core.download.multi_download; import android.annotation.SuppressLint; import android.os.Bundle; diff --git a/app/src/main/java/com/arialyy/simple/download/multi_download/FileListAdapter.java b/app/src/main/java/com/arialyy/simple/core/download/multi_download/FileListAdapter.java similarity index 94% rename from app/src/main/java/com/arialyy/simple/download/multi_download/FileListAdapter.java rename to app/src/main/java/com/arialyy/simple/core/download/multi_download/FileListAdapter.java index fc903c10..43783372 100644 --- a/app/src/main/java/com/arialyy/simple/download/multi_download/FileListAdapter.java +++ b/app/src/main/java/com/arialyy/simple/core/download/multi_download/FileListAdapter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.arialyy.simple.download.multi_download; +package com.arialyy.simple.core.download.multi_download; import android.content.Context; import android.view.View; @@ -118,10 +118,10 @@ final class FileListAdapter extends AbsRVAdapter { - Button mSigleBt; - Button mMultiBt; - Button mDialogBt; - Button mPopBt; - - @Override protected int setLayoutId() { - return R.layout.activity_download_mean; - } - - @Override protected void init(Bundle savedInstanceState) { - super.init(savedInstanceState); - setTitle("Aria下载"); - mSigleBt = getBinding().singleTask; - mMultiBt = getBinding().multiTask; - mDialogBt = getBinding().dialogTask; - mPopBt = getBinding().popTask; - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { - setEnable(true); - } else { //6.0处理 - boolean hasPermission = PermissionManager.getInstance() - .checkPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE); - if (hasPermission) { - setEnable(true); - } else { - setEnable(false); - PermissionManager.getInstance().requestPermission(this, new OnPermissionCallback() { - @Override public void onSuccess(String... permissions) { - setEnable(true); - } - - @Override public void onFail(String... permissions) { - T.showShort(DownloadActivity.this, "没有文件读写权限"); - setEnable(false); - } - }, Manifest.permission.WRITE_EXTERNAL_STORAGE); - } - } - } - - private void setEnable(boolean enable) { - mSigleBt.setEnabled(enable); - mMultiBt.setEnabled(enable); - mDialogBt.setEnabled(enable); - mPopBt.setEnabled(enable); - } - - public void onClick(View view) { - switch (view.getId()) { - case R.id.highest_priority: - startActivity(new Intent(this, HighestPriorityActivity.class)); - break; - case R.id.service: - startService(new Intent(this, DownloadService.class)); - break; - case R.id.single_task: - startActivity(new Intent(this, SingleTaskActivity.class)); - break; - case R.id.multi_task: - startActivity(new Intent(this, MultiTaskActivity.class)); - break; - case R.id.dialog_task: - DownloadDialog dialog = new DownloadDialog(this); - - dialog.show(); - //DownloadDialogFragment dialog = new DownloadDialogFragment(this); - //dialog.show(getSupportFragmentManager(), "dialog"); - break; - case R.id.pop_task: - DownloadPopupWindow pop = new DownloadPopupWindow(this); - pop.showAtLocation(mRootView, Gravity.CENTER_VERTICAL, 0, 0); - break; - case R.id.fragment_task: - startActivity(new Intent(this, FragmentActivity.class)); - break; - case R.id.notification: - //SimpleNotification notification = new SimpleNotification(this); - //notification.start(); - break; - } - } -} \ No newline at end of file diff --git a/app/src/main/java/com/arialyy/simple/test/AnyRunnModule.java b/app/src/main/java/com/arialyy/simple/modlue/AnyRunnModule.java similarity index 73% rename from app/src/main/java/com/arialyy/simple/test/AnyRunnModule.java rename to app/src/main/java/com/arialyy/simple/modlue/AnyRunnModule.java index 86bb4a03..46d32b78 100644 --- a/app/src/main/java/com/arialyy/simple/test/AnyRunnModule.java +++ b/app/src/main/java/com/arialyy/simple/modlue/AnyRunnModule.java @@ -1,11 +1,25 @@ -package com.arialyy.simple.test; +/* + * 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.simple.modlue; import android.content.Context; import android.os.Environment; import android.util.Log; import com.arialyy.annotations.Download; import com.arialyy.aria.core.Aria; -import com.arialyy.aria.core.common.RequestEnum; import com.arialyy.aria.core.download.DownloadTask; import com.arialyy.aria.util.CommonUtil; import com.arialyy.frame.util.show.L; @@ -62,7 +76,7 @@ public class AnyRunnModule { L.d(TAG, "md5Code ==> " + CommonUtil.getFileMD5(new File(task.getDownloadPath()))); } - void start(String url) { + public void start(String url) { mUrl = url; String path = Environment.getExternalStorageDirectory().getPath() + "/mmm2.mp4"; Aria.download(this) @@ -72,7 +86,7 @@ public class AnyRunnModule { .start(); } - void startFtp(String url) { + public void startFtp(String url) { mUrl = url; Aria.download(this) .loadFtp(url) @@ -85,15 +99,15 @@ public class AnyRunnModule { .start(); } - void stop(String url) { + public void stop(String url) { Aria.download(this).load(url).stop(); } - void cancel(String url) { + public void cancel(String url) { Aria.download(this).load(url).cancel(); } - void unRegister() { + public void unRegister() { Aria.download(this).unRegister(); } } diff --git a/app/src/main/java/com/arialyy/simple/modlue/CommonModule.java b/app/src/main/java/com/arialyy/simple/modlue/CommonModule.java new file mode 100644 index 00000000..f5c2c076 --- /dev/null +++ b/app/src/main/java/com/arialyy/simple/modlue/CommonModule.java @@ -0,0 +1,83 @@ +/* + * 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.simple.modlue; + +import android.content.Context; +import android.content.Intent; +import com.arialyy.frame.module.AbsModule; +import com.arialyy.simple.MainActivity; +import com.arialyy.simple.R; +import com.arialyy.simple.to.NormalTo; +import java.util.ArrayList; +import java.util.List; + +/** + * 通用Modle块 + */ +public class CommonModule extends AbsModule { + public CommonModule(Context context) { + super(context); + } + + public void startNextActivity(NormalTo to, Class clazz) { + Intent intent = new Intent(getContext(), clazz); + intent.putExtra(MainActivity.KEY_MAIN_DATA, to); + getContext().startActivity(intent); + } + + public List getDownloadData() { + List list = new ArrayList<>(); + String[] titles = getContext().getResources().getStringArray(R.array.download_items); + int[] icons = new int[] { + R.drawable.ic_http, + R.drawable.ic_http_group, + R.drawable.ic_top, + R.drawable.ic_server, + R.drawable.ic_windows + }; + int i = 0; + for (String title : titles) { + NormalTo to = new NormalTo(); + to.icon = icons[i]; + to.title = title; + i++; + list.add(to); + } + return list; + } + + public List getMainData() { + List list = new ArrayList<>(); + String[] titles = getContext().getResources().getStringArray(R.array.main_items); + int[] icons = new int[] { + R.drawable.ic_http, + R.drawable.ic_http, + R.drawable.ic_http_group, + R.drawable.ic_ftp, + R.drawable.ic_ftp_dir, + R.drawable.ic_ftp + }; + int i = 0; + for (String title : titles) { + NormalTo to = new NormalTo(); + to.icon = icons[i]; + to.title = title; + i++; + list.add(to); + } + return list; + } +} diff --git a/app/src/main/java/com/arialyy/simple/to/NormalTo.java b/app/src/main/java/com/arialyy/simple/to/NormalTo.java new file mode 100644 index 00000000..9ec63fa3 --- /dev/null +++ b/app/src/main/java/com/arialyy/simple/to/NormalTo.java @@ -0,0 +1,54 @@ +/* + * 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.simple.to; + +import android.os.Parcel; +import android.os.Parcelable; + +/** + * 简单列表对象 + */ +public class NormalTo implements Parcelable { + public int icon; + public String title; + + @Override public int describeContents() { + return 0; + } + + @Override public void writeToParcel(Parcel dest, int flags) { + dest.writeInt(this.icon); + dest.writeString(this.title); + } + + public NormalTo() { + } + + protected NormalTo(Parcel in) { + this.icon = in.readInt(); + this.title = in.readString(); + } + + public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { + @Override public NormalTo createFromParcel(Parcel source) { + return new NormalTo(source); + } + + @Override public NormalTo[] newArray(int size) { + return new NormalTo[size]; + } + }; +} diff --git a/app/src/main/res/drawable-v21/item_bg.xml b/app/src/main/res/drawable-v21/item_bg.xml new file mode 100644 index 00000000..271d38dc --- /dev/null +++ b/app/src/main/res/drawable-v21/item_bg.xml @@ -0,0 +1,11 @@ + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_activity.xml b/app/src/main/res/drawable/ic_activity.xml new file mode 100644 index 00000000..0f538987 --- /dev/null +++ b/app/src/main/res/drawable/ic_activity.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_del.xml b/app/src/main/res/drawable/ic_del.xml new file mode 100644 index 00000000..41990767 --- /dev/null +++ b/app/src/main/res/drawable/ic_del.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_fragment.xml b/app/src/main/res/drawable/ic_fragment.xml new file mode 100644 index 00000000..addb973e --- /dev/null +++ b/app/src/main/res/drawable/ic_fragment.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/app/src/main/res/drawable/ic_ftp.xml b/app/src/main/res/drawable/ic_ftp.xml new file mode 100644 index 00000000..7f8066e7 --- /dev/null +++ b/app/src/main/res/drawable/ic_ftp.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_ftp_dir.xml b/app/src/main/res/drawable/ic_ftp_dir.xml new file mode 100644 index 00000000..dd2ec940 --- /dev/null +++ b/app/src/main/res/drawable/ic_ftp_dir.xml @@ -0,0 +1,5 @@ + + + + diff --git a/app/src/main/res/drawable/ic_http.xml b/app/src/main/res/drawable/ic_http.xml new file mode 100644 index 00000000..ef48ccb7 --- /dev/null +++ b/app/src/main/res/drawable/ic_http.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_http_group.xml b/app/src/main/res/drawable/ic_http_group.xml new file mode 100644 index 00000000..75aa61a5 --- /dev/null +++ b/app/src/main/res/drawable/ic_http_group.xml @@ -0,0 +1,5 @@ + + + + diff --git a/app/src/main/res/drawable/ic_server.xml b/app/src/main/res/drawable/ic_server.xml new file mode 100644 index 00000000..dc3e359a --- /dev/null +++ b/app/src/main/res/drawable/ic_server.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/app/src/main/res/drawable/ic_start.xml b/app/src/main/res/drawable/ic_start.xml new file mode 100644 index 00000000..9777ee84 --- /dev/null +++ b/app/src/main/res/drawable/ic_start.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_stop.xml b/app/src/main/res/drawable/ic_stop.xml new file mode 100644 index 00000000..d074b68d --- /dev/null +++ b/app/src/main/res/drawable/ic_stop.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_top.xml b/app/src/main/res/drawable/ic_top.xml new file mode 100644 index 00000000..467610e2 --- /dev/null +++ b/app/src/main/res/drawable/ic_top.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_view.xml b/app/src/main/res/drawable/ic_view.xml new file mode 100644 index 00000000..e1377baf --- /dev/null +++ b/app/src/main/res/drawable/ic_view.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_windows.xml b/app/src/main/res/drawable/ic_windows.xml new file mode 100644 index 00000000..6d9526f7 --- /dev/null +++ b/app/src/main/res/drawable/ic_windows.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/app/src/main/res/drawable/item_bg.xml b/app/src/main/res/drawable/item_bg.xml new file mode 100644 index 00000000..1f969355 --- /dev/null +++ b/app/src/main/res/drawable/item_bg.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_download_mean.xml b/app/src/main/res/layout/activity_download_mean.xml index 3ac2c991..7a4806ae 100644 --- a/app/src/main/res/layout/activity_download_mean.xml +++ b/app/src/main/res/layout/activity_download_mean.xml @@ -11,76 +11,10 @@ -