Properly set the document download icon tint.

This commit is contained in:
Greyson Parrelli
2018-10-16 10:58:19 -07:00
parent e1f572e1f4
commit 7cadb0d35a
6 changed files with 10 additions and 2 deletions

View File

@@ -67,13 +67,16 @@ public class DocumentView extends FrameLayout {
this.document = findViewById(R.id.document);
if (attrs != null) {
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.DocumentView, 0, 0);
TypedArray typedArray = getContext().getTheme().obtainStyledAttributes(attrs, R.styleable.DocumentView, 0, 0);
int titleColor = typedArray.getInt(R.styleable.DocumentView_doc_titleColor, Color.BLACK);
int captionColor = typedArray.getInt(R.styleable.DocumentView_doc_captionColor, Color.BLACK);
int downloadTint = typedArray.getInt(R.styleable.DocumentView_doc_downloadButtonTint, Color.WHITE);
typedArray.recycle();
fileName.setTextColor(titleColor);
fileSize.setTextColor(captionColor);
downloadButton.setColorFilter(downloadTint, PorterDuff.Mode.MULTIPLY);
downloadProgress.setBarColor(downloadTint);
}
}