Пример #1
0
  @Override
  protected View initView() {
    View view = View.inflate(UIUtils.getContext(), R.layout.item_app_info, null);

    // View注入
    ViewUtils.inject(this, view);

    // 设置点击事件
    mPcvProgress.setOnClickListener(this);

    mDownloadManager = DownloadManager.getInstance(); // 初始化

    return view;
  }
Пример #2
0
  /** 检查下载状态 */
  public void checkDownloadState() {
    mDownloadBean = DownloadManager.getInstance().getCurrentState(mData);

    safeRefreshView(mDownloadBean);
  }
Пример #3
0
 /** 暂停 */
 private void doPause() {
   mDownloadManager.pause(mData);
 }
Пример #4
0
 /** 打开 */
 private void doOpen() {
   mDownloadManager.open(mData);
 }
Пример #5
0
 /** 安装 */
 private void doInstall() {
   mDownloadManager.install(mData);
 }
Пример #6
0
 /** 下载 */
 private void doDownload() {
   mDownloadManager.download(mData);
 }