0
0
mirror of https://github.com/schwabe/ics-openvpn.git synced 2024-09-20 03:52:27 +02:00

Add launcher shortcut icons

This commit is contained in:
chrihu 2017-01-26 15:59:40 +01:00 committed by Arne Schwabe
parent 3423d5c632
commit 23095590c9
3 changed files with 34 additions and 2 deletions

View File

@ -172,7 +172,7 @@ public class VPNProfileList extends ListFragment implements OnClickListener, Vpn
.setShortLabel("Disconnect")
.setLongLabel("Disconnect VPN")
.setIntent(new Intent(getContext(), DisconnectVPN.class).setAction(DISCONNECT_VPN))
.setIcon(Icon.createWithResource(getContext(), R.drawable.ic_menu_close_clear_cancel))
.setIcon(Icon.createWithResource(getContext(), R.drawable.ic_shortcut_cancel))
.build();
LinkedList<ShortcutInfo> newShortcuts = new LinkedList<>();
@ -248,7 +248,7 @@ public class VPNProfileList extends ListFragment implements OnClickListener, Vpn
return new ShortcutInfo.Builder(getContext(), profile.getUUIDString())
.setShortLabel(profile.getName())
.setLongLabel(getString(R.string.qs_connect, profile.getName()))
.setIcon(Icon.createWithResource(getContext(), R.mipmap.ic_launcher))
.setIcon(Icon.createWithResource(getContext(), R.drawable.ic_shortcut_vpn_key))
.setIntent(shortcutIntent)
.build();
}

View File

@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
android:pathData="M24,24m-22,0a22,22 0,1 1,44 0a22,22 0,1 1,-44 0"
android:strokeColor="#00000000"
android:fillColor="#F5F5F5"
android:strokeWidth="1"/>
<path
android:pathData="M24,14C18.47,14 14,18.47 14,24C14,29.53 18.47,34 24,34C29.53,34 34,29.53 34,24C34,18.47 29.53,14 24,14L24,14ZM29,27.59L27.59,29L24,25.41L20.41,29L19,27.59L22.59,24L19,20.41L20.41,19L24,22.59L27.59,19L29,20.41L25.41,24L29,27.59L29,27.59Z"
android:strokeColor="#00000000"
android:fillColor="#3F51B5"
android:strokeWidth="1"/>
</vector>

View File

@ -0,0 +1,16 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
android:pathData="M24,24m-22,0a22,22 0,1 1,44 0a22,22 0,1 1,-44 0"
android:strokeColor="#00000000"
android:fillColor="#F5F5F5"
android:strokeWidth="1"/>
<path
android:pathData="M24.65,22C23.83,19.67 21.61,18 19,18C15.69,18 13,20.69 13,24C13,27.31 15.69,30 19,30C21.61,30 23.83,28.33 24.65,26L29,26L29,30L33,30L33,26L35,26L35,22L24.65,22L24.65,22ZM19,26C17.9,26 17,25.1 17,24C17,22.9 17.9,22 19,22C20.1,22 21,22.9 21,24C21,25.1 20.1,26 19,26L19,26Z"
android:strokeColor="#00000000"
android:fillColor="#3F51B5"
android:strokeWidth="1"/>
</vector>