List of usage examples for android.app DownloadManager COLUMN_DESCRIPTION
String COLUMN_DESCRIPTION
To view the source code for android.app DownloadManager COLUMN_DESCRIPTION.
Click Source Link
From source file:com.github.notizklotz.derbunddownloader.issuesgrid.DownloadedIssuesActivity.java
@AfterViews void setupIssuesGrid() { gridView.setEmptyView(emptyGridView); gridView.setOnItemClickListener(new IssuesGridOnItemClickListener()); final SimpleCursorAdapter issueListAdapter = new SimpleCursorAdapter(this, R.layout.include_issue, null, new String[] { DownloadManager.COLUMN_DESCRIPTION, DownloadManager.COLUMN_STATUS }, new int[] { R.id.dateTextView, R.id.stateTextView }, 0) { @Override/* ww w.j av a 2 s .c om*/ public View getView(final int position, View convertView, ViewGroup parent) { View view = super.getView(position, convertView, parent); View deleteButton = view.findViewById(R.id.issueDeleteButton); deleteButton.setOnClickListener(new IssueDeleteButtonOnClickListener(position)); // Load the thumbnail image ImageView image = (ImageView) view.findViewById(R.id.issueImageView); Uri uri = Uri.parse(getCursor().getString(getCursor().getColumnIndex(DownloadManager.COLUMN_URI))); Picasso.with(image.getContext()).load(IssueDownloadService_.getThumbnailUriForPDFUri(uri)) .placeholder(R.drawable.issue_placeholder).into(image); return view; } }; issueListAdapter.setViewBinder(new IssuesGridViewBinder(this)); gridView.setAdapter(issueListAdapter); getLoaderManager().initLoader(1, null, new IssuesGridLoaderCallbacks(this, issueListAdapter)); }