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.
BIN
F-Droid/res/drawable-hdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 222 B |
BIN
F-Droid/res/drawable-hdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 663 B |
BIN
F-Droid/res/drawable-hdpi/ic_delete_white.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
F-Droid/res/drawable-hdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-hdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
F-Droid/res/drawable-hdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 1000 B |
BIN
F-Droid/res/drawable-hdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
F-Droid/res/drawable-hdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 399 B |
BIN
F-Droid/res/drawable-hdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 875 B |
BIN
F-Droid/res/drawable-hdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 871 B |
BIN
F-Droid/res/drawable-hdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 974 B |
BIN
F-Droid/res/drawable-hdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 857 B |
BIN
F-Droid/res/drawable-hdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
F-Droid/res/drawable-mdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
F-Droid/res/drawable-mdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
F-Droid/res/drawable-mdpi/ic_delete_white.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
F-Droid/res/drawable-mdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 815 B |
BIN
F-Droid/res/drawable-mdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
F-Droid/res/drawable-mdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 703 B |
BIN
F-Droid/res/drawable-mdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
F-Droid/res/drawable-mdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 318 B |
BIN
F-Droid/res/drawable-mdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
F-Droid/res/drawable-mdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 591 B |
BIN
F-Droid/res/drawable-mdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 737 B |
BIN
F-Droid/res/drawable-mdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
F-Droid/res/drawable-mdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 202 B |
BIN
F-Droid/res/drawable-xhdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
F-Droid/res/drawable-xhdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 771 B |
0
F-Droid/res/drawable-xhdpi/ic_delete_white.png
Normal file
BIN
F-Droid/res/drawable-xhdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 632 B |
BIN
F-Droid/res/drawable-xhdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 774 B |
BIN
F-Droid/res/drawable-xhdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
F-Droid/res/drawable-xhdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_delete_white.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 843 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 666 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
F-Droid/res/drawable-xxxhdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
F-Droid/res/drawable-xxxhdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_delete_white.png
Normal file
After Width: | Height: | Size: 719 B |
BIN
F-Droid/res/drawable-xxxhdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 835 B |
BIN
F-Droid/res/drawable-xxxhdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 460 B |
BIN
F-Droid/res/drawable/ic_add_white.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
F-Droid/res/drawable/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
F-Droid/res/drawable/ic_delete_white.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
F-Droid/res/drawable/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 815 B |
BIN
F-Droid/res/drawable/ic_edit_white.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
F-Droid/res/drawable/ic_help_white.png
Normal file
After Width: | Height: | Size: 703 B |
BIN
F-Droid/res/drawable/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
F-Droid/res/drawable/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 318 B |
BIN
F-Droid/res/drawable/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
F-Droid/res/drawable/ic_search_white.png
Normal file
After Width: | Height: | Size: 591 B |
BIN
F-Droid/res/drawable/ic_settings_white.png
Normal file
After Width: | Height: | Size: 737 B |
BIN
F-Droid/res/drawable/ic_share_white.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
F-Droid/res/drawable/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 202 B |
@ -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"/>
|
||||||
|
|
||||||
|
@ -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>
|
@ -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
|
||||||
|
@ -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"/>
|
||||||
|
|
||||||
|
@ -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">
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
74
F-Droid/tools/download-material-icon.sh
Executable 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 ""
|
@ -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/).
|
||||||
|