Пример #1
0
  /** 安全的刷新UI */
  public void safeRefreshView(final DownloadBean data) {
    if (!data.packageName.equals(mData.packageName)) {
      return;
    }

    UIUtils.runOnUiThread(
        new Runnable() {

          @Override
          public void run() {
            refreshView(data);
          }
        });
  }
Пример #2
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;
  }