diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-01-23 17:17:01 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-01-24 15:08:21 +0000 |
commit | 8a0c34842dff4efb56ac5e7c0a7a4987dd0ec00d (patch) | |
tree | 273524168b574255d63e25a5be7241710fd54060 /android | |
parent | 5b8ea84e87614ae026ec48957ff765505006133c (diff) | |
download | mupdf-8a0c34842dff4efb56ac5e7c0a7a4987dd0ec00d.tar.xz |
android: Tint the icon in the file picker.
Use setImageResource instead of setBackgroundResource!
Diffstat (limited to 'android')
-rw-r--r-- | android/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/android/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java b/android/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java index c26174a2..0b3c6418 100644 --- a/android/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java +++ b/android/src/com/artifex/mupdfdemo/ChoosePDFAdapter.java @@ -2,6 +2,7 @@ package com.artifex.mupdfdemo; import java.util.LinkedList; +import android.graphics.Color; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -57,7 +58,8 @@ public class ChoosePDFAdapter extends BaseAdapter { } ChoosePDFItem item = mItems.get(position); ((TextView)v.findViewById(R.id.name)).setText(item.name); - ((ImageView)v.findViewById(R.id.icon)).setBackgroundResource(iconForType(item.type)); + ((ImageView)v.findViewById(R.id.icon)).setImageResource(iconForType(item.type)); + ((ImageView)v.findViewById(R.id.icon)).setColorFilter(Color.argb(255, 0, 0, 0)); return v; } |