Bug 1311555 - Use filled bookmark star in ActivityStream context menu r=sebastian

Unfortunately tinting the bookmark star is highly complicated due to the tinting
that NavigationView performs (i.e. we'd likely have to disable NavigationView
tinting, and do manual tinting on every icon - alternatively we could hack
the tint-list to use blue for "checked" items, and set the bookmark item
as checked). Since it's unclear if we even want the star to be blue,
we'll leave it grey (but filled) for now.

MozReview-Commit-ID: DekRZJayKIz

--HG--
extra : rebase_source : 1e3443e5f09c60bd0d7295bc35ecc08ca17b3dab
This commit is contained in:
Andrzej Hunt 2017-01-18 12:20:50 +01:00
parent 9bd6a8b199
commit 1e0cff53d2
2 changed files with 11 additions and 0 deletions

View File

@ -80,6 +80,7 @@ public abstract class ActivityStreamContextMenu
final MenuItem bookmarkItem = getItemByID(R.id.bookmark);
if (Boolean.TRUE.equals(item.isBookmarked())) {
bookmarkItem.setTitle(R.string.bookmark_remove);
bookmarkItem.setIcon(R.drawable.as_bookmark_filled);
}
final MenuItem pinItem = getItemByID(R.id.pin);
@ -109,6 +110,7 @@ public abstract class ActivityStreamContextMenu
protected void onPostExecute(Boolean hasBookmark) {
if (hasBookmark) {
bookmarkItem.setTitle(R.string.bookmark_remove);
bookmarkItem.setIcon(R.drawable.as_bookmark_filled);
}
item.updateBookmarked(hasBookmark);

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12.01,1C11.508,1.068 11.087,1.415 10.925,1.895L8.178,7.562L2.301,8.552C0.956,8.771 0.622,9.738 1.557,10.7L5.717,15.186L4.748,21.497C4.601,22.445 4.99,22.997 5.673,22.997C5.985,22.985 6.291,22.899 6.564,22.748L12.021,19.817L17.542,22.748C17.816,22.9 18.121,22.985 18.434,22.997C19.117,22.997 19.504,22.442 19.36,21.497L18.394,15.186L22.505,10.705C23.441,9.739 23.105,8.771 21.761,8.552L15.972,7.562L13.1,1.9C12.939,1.416 12.516,1.067 12.01,1L12.01,1Z"/>
</vector>