コード例 #1
0
 @AfterViews
 protected final void initAttachmentsTextDetailActivity() {
   if (mExtraFile != null) {
     textView.setText(Global.readTextFile(mExtraFile));
     findViewById(R.id.layout_dynamic_history).setVisibility(View.GONE);
   } else {
     urlFiles = String.format(urlFiles, mProjectObjectId, mAttachmentFileObject.file_id);
     if (mFile.exists()) {
       textView.setText(Global.readTextFile(mFile));
     } else {
       showDialogLoading();
       getFileUrlFromNetwork();
     }
   }
 }
コード例 #2
0
  private void updateLoadFile() {
    if (mAttachmentFileObject == null || mProjectObjectId == 0) {
      return;
    }

    mFile =
        FileUtil.getDestinationInExternalPublicDir(
            getFileDownloadPath(), mAttachmentFileObject.getSaveName(mProjectObjectId));
    if (mFile != null && mFile.exists()) {
      textView.setText(Global.readTextFile(mFile));
    }
  }