Added material icons from CC licensed "Google material icons" set.

Fixes #240.

To make this easier, I added a script to aid in downloading icons.
Checkout F-Droid/tools/download-material-icon.sh for more details.

The icons are licensed under the CCv4 attribution license, which I
added a shout out to under "License" in the README.md.
This commit is contained in:
Peter Serwylo 2015-05-11 23:04:33 +10:00 committed by Nico Alt
parent 71605e98dc
commit a345788dba
87 changed files with 99 additions and 21 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1000 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 565 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

View File

@ -4,12 +4,12 @@
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:icon="@android:drawable/ic_menu_search" android:icon="@drawable/ic_search_white"
android:title="@string/menu_search" android:title="@string/menu_search"
app:showAsAction="always"/> app:showAsAction="always"/>
<item <item
android:id="@+id/action_update_repo" android:id="@+id/action_update_repo"
android:icon="@drawable/ic_menu_refresh" android:icon="@drawable/ic_refresh_white"
android:title="@string/menu_update_repo" android:title="@string/menu_update_repo"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
@ -18,22 +18,22 @@
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/action_manage_repos" android:id="@+id/action_manage_repos"
android:icon="@android:drawable/ic_menu_agenda" android:icon="@drawable/ic_view_headline_white"
android:title="@string/menu_manage" android:title="@string/menu_manage"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/action_bluetooth_apk" android:id="@+id/action_bluetooth_apk"
android:icon="@android:drawable/stat_sys_data_bluetooth" android:icon="@drawable/ic_bluetooth_white"
android:title="@string/menu_send_apk_bt" android:title="@string/menu_send_apk_bt"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/action_settings" android:id="@+id/action_settings"
android:icon="@android:drawable/ic_menu_preferences" android:icon="@drawable/ic_settings_white"
android:title="@string/menu_preferences" android:title="@string/menu_preferences"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/action_about" android:id="@+id/action_about"
android:icon="@android:drawable/ic_menu_help" android:icon="@drawable/ic_help_white"
android:title="@string/menu_about" android:title="@string/menu_about"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>

View File

@ -5,11 +5,11 @@
<item <item
android:id="@+id/edit_repo" android:id="@+id/edit_repo"
android:title="@string/edit" android:title="@string/edit"
android:icon="@android:drawable/ic_menu_edit" /> android:icon="@drawable/ic_edit_white" />
<item <item
android:id="@+id/delete_repo" android:id="@+id/delete_repo"
android:title="@string/delete" android:title="@string/delete"
android:icon="@android:drawable/ic_menu_delete" /> android:icon="@drawable/ic_delete_white" />
</menu> </menu>

View File

@ -4,12 +4,12 @@
<item <item
android:id="@+id/action_update_repo" android:id="@+id/action_update_repo"
android:icon="@drawable/ic_menu_refresh" android:icon="@drawable/ic_refresh_white"
android:title="@string/menu_update_repo" android:title="@string/menu_update_repo"
app:showAsAction="always|withText"/> app:showAsAction="always|withText"/>
<item <item
android:id="@+id/action_add_repo" android:id="@+id/action_add_repo"
android:icon="@android:drawable/ic_menu_add" android:icon="@drawable/ic_add_white"
android:title="@string/menu_add_repo" android:title="@string/menu_add_repo"
app:showAsAction="always|withText"/> app:showAsAction="always|withText"/>
<item <item

View File

@ -7,7 +7,7 @@
<item <item
android:id="@+id/action_search" android:id="@+id/action_search"
android:icon="@android:drawable/ic_menu_search" android:icon="@drawable/ic_search_white"
android:title="@string/menu_search" android:title="@string/menu_search"
android:titleCondensed="@string/menu_search"/> android:titleCondensed="@string/menu_search"/>

View File

@ -104,7 +104,6 @@
<item name="android:paddingRight">10dp</item> <item name="android:paddingRight">10dp</item>
<item name="android:paddingTop">5dp</item> <item name="android:paddingTop">5dp</item>
<item name="android:paddingBottom">5dp</item> <item name="android:paddingBottom">5dp</item>
<item name="android:background">@drawable/swap_action_button_skin</item>
</style> </style>
<style name="SwapTheme.Wizard.MainText" parent="@style/SwapTheme.Wizard.Text"> <style name="SwapTheme.Wizard.MainText" parent="@style/SwapTheme.Wizard.Text">

View File

@ -632,14 +632,14 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
MenuItemCompat.setShowAsAction(menu.add( MenuItemCompat.setShowAsAction(menu.add(
Menu.NONE, SHARE, 1, R.string.menu_share) Menu.NONE, SHARE, 1, R.string.menu_share)
.setIcon(android.R.drawable.ic_menu_share), .setIcon(R.drawable.ic_share_white),
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_IF_ROOM |
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
if (app.isInstalled()) { if (app.isInstalled()) {
MenuItemCompat.setShowAsAction(menu.add( MenuItemCompat.setShowAsAction(menu.add(
Menu.NONE, UNINSTALL, 1, R.string.menu_uninstall) Menu.NONE, UNINSTALL, 1, R.string.menu_uninstall)
.setIcon(android.R.drawable.ic_menu_delete), .setIcon(R.drawable.ic_delete_white),
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_IF_ROOM |
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
} }
@ -647,19 +647,19 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
if (mPm.getLaunchIntentForPackage(app.id) != null && app.canAndWantToUpdate()) { if (mPm.getLaunchIntentForPackage(app.id) != null && app.canAndWantToUpdate()) {
MenuItemCompat.setShowAsAction(menu.add( MenuItemCompat.setShowAsAction(menu.add(
Menu.NONE, LAUNCH, 1, R.string.menu_launch) Menu.NONE, LAUNCH, 1, R.string.menu_launch)
.setIcon(android.R.drawable.ic_media_play), .setIcon(R.drawable.ic_play_arrow_white),
MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_ALWAYS |
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
} }
menu.add(Menu.NONE, IGNOREALL, 2, R.string.menu_ignore_all) menu.add(Menu.NONE, IGNOREALL, 2, R.string.menu_ignore_all)
.setIcon(android.R.drawable.ic_menu_close_clear_cancel) .setIcon(R.drawable.ic_do_not_disturb_white)
.setCheckable(true) .setCheckable(true)
.setChecked(app.ignoreAllUpdates); .setChecked(app.ignoreAllUpdates);
if (app.hasUpdates()) { if (app.hasUpdates()) {
menu.add(Menu.NONE, IGNORETHIS, 2, R.string.menu_ignore_this) menu.add(Menu.NONE, IGNORETHIS, 2, R.string.menu_ignore_this)
.setIcon(android.R.drawable.ic_menu_close_clear_cancel) .setIcon(R.drawable.ic_do_not_disturb_white)
.setCheckable(true) .setCheckable(true)
.setChecked(app.ignoreThisUpdate >= app.suggestedVercode); .setChecked(app.ignoreThisUpdate >= app.suggestedVercode);
} }
@ -667,7 +667,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
// Ignore on devices without Bluetooth // Ignore on devices without Bluetooth
if (app.isInstalled() && fdroidApp.bluetoothAdapter != null) { if (app.isInstalled() && fdroidApp.bluetoothAdapter != null) {
menu.add(Menu.NONE, SEND_VIA_BLUETOOTH, 3, R.string.send_via_bluetooth) menu.add(Menu.NONE, SEND_VIA_BLUETOOTH, 3, R.string.send_via_bluetooth)
.setIcon(android.R.drawable.stat_sys_data_bluetooth); .setIcon(R.drawable.ic_bluetooth_white);
} }
return true; return true;
} }

View File

@ -274,13 +274,13 @@ public class RepoDetailsFragment extends Fragment {
menu.clear(); menu.clear();
MenuItem update = menu.add(Menu.NONE, UPDATE, 0, R.string.repo_update); MenuItem update = menu.add(Menu.NONE, UPDATE, 0, R.string.repo_update);
update.setIcon(R.drawable.ic_menu_refresh); update.setIcon(R.drawable.ic_refresh_white);
MenuItemCompat.setShowAsAction(update, MenuItemCompat.setShowAsAction(update,
MenuItemCompat.SHOW_AS_ACTION_ALWAYS | MenuItemCompat.SHOW_AS_ACTION_ALWAYS |
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
MenuItem delete = menu.add(Menu.NONE, DELETE, 0, R.string.delete); MenuItem delete = menu.add(Menu.NONE, DELETE, 0, R.string.delete);
delete.setIcon(android.R.drawable.ic_menu_delete); delete.setIcon(R.drawable.ic_delete_white);
MenuItemCompat.setShowAsAction(delete, MenuItemCompat.setShowAsAction(delete,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_IF_ROOM |
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
@ -307,7 +307,7 @@ public class RepoDetailsFragment extends Fragment {
if (enableNfc != null) if (enableNfc != null)
return; // already created return; // already created
enableNfc = menu.add(Menu.NONE, ENABLE_NFC, 0, R.string.enable_nfc_send); enableNfc = menu.add(Menu.NONE, ENABLE_NFC, 0, R.string.enable_nfc_send);
enableNfc.setIcon(android.R.drawable.ic_menu_preferences); enableNfc.setIcon(R.drawable.ic_nfc_white);
MenuItemCompat.setShowAsAction(enableNfc, MenuItemCompat.setShowAsAction(enableNfc,
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM | MenuItemCompat.SHOW_AS_ACTION_IF_ROOM |
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT); MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);

View File

@ -0,0 +1,74 @@
#!/bin/bash
#
# Helper script to download icons from https://github.com/google/material-design-icons and
# put the in the relevant drawable-* directories.
#
function usage {
echo "USAGE: download-material-icon.sh res-directory category icon"
echo " res-directory Usually \"res\" in your android project"
echo " category the grouping seen in the URL below (e.g. action, alert, av, communication, content, etc)"
echo " icon is the name if the icon (see URL below for icons)"
echo ""
echo "To see available icons, visit http://google.github.io/material-design-icons/"
}
function download {
REMOTE_DRAWABLE_DIR=$1
LOCAL_DRAWABLE_DIR=$2
FILE="ic_${ICON}_48dp.png"
URL="$BASE_URL/$CATEGORY/$REMOTE_DRAWABLE_DIR/$FILE"
DIR="$RES_DIR/$LOCAL_DRAWABLE_DIR"
if [ ! -d $DIR ]
then
echo "Creating dir $DIR"
mkdir $DIR
fi
LOCAL_PATH="$DIR/ic_${ICON}.png"
echo "Downloading to $LOCAL_PATH"
wget --quiet --output-document=$LOCAL_PATH $URL
if [ ! -s $LOCAL_PATH ]
then
if [ -f $LOCAL_PATH ]
then
rm $LOCAL_PATH
fi
echo "ERROR: Could not download from $URL to $LOCAL_PATH failed."
echo ""
usage
exit
fi
}
RES_DIR=$1
CATEGORY=$2
ICON="${3}_white"
BASE_URL="https://raw.githubusercontent.com/google/material-design-icons/master"
SCREENS="mdpi hdpi xhdpi xxhdpi xxxhdpi"
if [ ! -d $RES_DIR ]
then
echo "ERROR: $RES_DIR is not a directory"
echo ""
usage
exit
fi
download drawable-mdpi drawable
for SCREEN in $SCREENS
do
download "drawable-$SCREEN" "drawable-$SCREEN"
done
echo ""
echo "Please make sure you have the following attribution (or words to this effect) somewhere in your project:"
echo ""
echo " Some icons are from the Material Design Icon set (https://github.com/google/material-design-icons)"
echo " released under an Attribution 4.0 International license (http://creativecommons.org/licenses/by/4.0/)"
echo ""

View File

@ -139,3 +139,8 @@ Some icons are made by [Picol](http://www.flaticon.com/authors/picol),
[Dave Gandy](http://www.flaticon.com/authors/dave-gandy) from [Dave Gandy](http://www.flaticon.com/authors/dave-gandy) from
[Flaticon](http://www.flaticon.com) or by Google and are licensed by [Flaticon](http://www.flaticon.com) or by Google and are licensed by
[Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/). [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/).
Other icons are from the
[Material Design Icon set](https://github.com/google/material-design-icons)
released under an
[Attribution 4.0 International license](http://creativecommons.org/licenses/by/4.0/).