| | |
| | | int progress = getProgressValue(totalBytes, currentBytes); |
| | | |
| | | boolean indeterminate = status == DownloadManager.STATUS_PENDING; |
| | | ProgressBar progressBar = (ProgressBar) convertView |
| | | ProgressBar progressBar = convertView |
| | | .findViewById(R.id.download_progress); |
| | | progressBar.setIndeterminate(indeterminate); |
| | | if (!indeterminate) { |
| | |
| | | mResources.getString(getStatusStringId(status))); |
| | | setTextForView(convertView, R.id.last_modified_date, getDateString()); |
| | | |
| | | CheckBox checkBox = (CheckBox) convertView |
| | | CheckBox checkBox = convertView |
| | | .findViewById(R.id.download_checkbox); |
| | | checkBox.setChecked(mDownloadSelectionListener |
| | | .isDownloadSelected(downloadId)); |
| | |
| | | |
| | | private void retrieveAndSetIcon(View convertView) { |
| | | String mediaType = mCursor.getString(mMediaTypeColumnId); |
| | | ImageView iconView = (ImageView) convertView |
| | | ImageView iconView = convertView |
| | | .findViewById(R.id.download_icon); |
| | | iconView.setVisibility(View.INVISIBLE); |
| | | |
| | |
| | | } |
| | | |
| | | private void setTextForView(View parent, int textViewId, String text) { |
| | | TextView view = (TextView) parent.findViewById(textViewId); |
| | | TextView view = parent.findViewById(textViewId); |
| | | view.setText(text); |
| | | } |
| | | |