Use color filters to replace multiple drawable resources with single gray scale image

NEW
Unassigned

Status

()

3 years ago
3 years ago

People

(Reporter: Margaret, Unassigned, NeedInfo)

Tracking

(Blocks: 2 bugs)

35 Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
We should audit the images in the tree to see if we can use color filters to eliminate some images that are included in multiple color.

On quick glance, I see a few candidates:

* lock_identified/lock_verified
* menu/menu_light/menu_pb
* reader/reader_active
* search_icon_active/search_icon_inactive
* sync_desktop/sync_desktop_inactive
* sync_mobile/sync_mobile_inactive

Martyn and Mike, do I remember things correctly that you two were talking about looking into this?

Looking through our drawable resources, I also see a ton of various "x" and "+" icons in different shapes and sizes. I wonder if we could find a way to consolidate those (but that would be a separate bug).
Flags: needinfo?(michael.l.comella)
Flags: needinfo?(mhaigh)
(In reply to :Margaret Leibovic from comment #0)
> Martyn and Mike, do I remember things correctly that you two were talking
> about looking into this?

I filed bug 1167446 for magnifying glasses.

You could use the android:tint attribute to do a straight color replacement (which likely will only work for "flat" images) and perhaps combine it with android:tintMode to do more complex replacement (e.g. maybe this will act more like a color filter to do more complex replacement). Then there is also ImageView.setColorFilter.

> Looking through our drawable resources, I also see a ton of various "x" and
> "+" icons in different shapes and sizes. I wonder if we could find a way to
> consolidate those (but that would be a separate bug).

We said scaling down is okay so that's also feasible.
Flags: needinfo?(michael.l.comella)
You need to log in before you can comment on or make changes to this bug.