Skip to content

Commit 6abc0fe

Browse files
piyush kumar sadangilukstbit
authored andcommitted
Add icons to Study, Add, and Card Browser shortcuts
1 parent 1ae5403 commit 6abc0fe

4 files changed

Lines changed: 71 additions & 3 deletions

File tree

AnkiDroid/src/main/java/com/ichi2/anki/NavigationDrawerActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ abstract class NavigationDrawerActivity :
441441
val reviewCardsShortcut = ShortcutInfo.Builder(context, "reviewCardsShortcutId")
442442
.setShortLabel(context.getString(R.string.studyoptions_start))
443443
.setLongLabel(context.getString(R.string.studyoptions_start))
444-
.setIcon(Icon.createWithResource(context, R.drawable.ankidroid_logo))
444+
.setIcon(Icon.createWithResource(context, R.drawable.review_shortcut))
445445
.setIntent(intentReviewCards)
446446
.build()
447447

@@ -453,7 +453,7 @@ abstract class NavigationDrawerActivity :
453453
val NoteEditorShortcut = ShortcutInfo.Builder(context, "noteEditorShortcutId")
454454
.setShortLabel(context.getString(R.string.menu_add))
455455
.setLongLabel(context.getString(R.string.menu_add))
456-
.setIcon(Icon.createWithResource(context, R.drawable.ankidroid_logo))
456+
.setIcon(Icon.createWithResource(context, R.drawable.add_shortcut))
457457
.setIntent(intentAddNote)
458458
.build()
459459

@@ -464,7 +464,7 @@ abstract class NavigationDrawerActivity :
464464
val cardBrowserShortcut = ShortcutInfo.Builder(context, "cardBrowserShortcutId")
465465
.setShortLabel(context.getString(R.string.card_browser))
466466
.setLongLabel(context.getString(R.string.card_browser))
467-
.setIcon(Icon.createWithResource(context, R.drawable.ankidroid_logo))
467+
.setIcon(Icon.createWithResource(context, R.drawable.browse_shortcut))
468468
.setIntent(intentCardBrowser)
469469
.build()
470470
shortcutManager.addDynamicShortcuts(
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--
2+
~ Copyright 2xxx, Google Material Design Icons
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
16+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
17+
android:width="24dp"
18+
android:height="24dp"
19+
android:viewportWidth="960"
20+
android:viewportHeight="960"
21+
android:tint="@android:color/holo_blue_dark">
22+
<path
23+
android:fillColor="#FFFFFF"
24+
android:pathData="M445.93,764.07L445.93,514.07L195.93,514.07L195.93,445.93L445.93,445.93L445.93,195.93L514.07,195.93L514.07,445.93L764.07,445.93L764.07,514.07L514.07,514.07L514.07,764.07L445.93,764.07Z"/>
25+
</vector>
26+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!--
2+
~ Copyright 2xxx, Google Material Design Icons
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
16+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
17+
android:viewportWidth="24"
18+
android:viewportHeight="24"
19+
android:tint="@android:color/holo_blue_dark"
20+
android:width="24dp"
21+
android:height="24dp">
22+
<path
23+
android:pathData="M19 14V6C19 4.9 18.1 4 17 4H3C1.9 4 1 4.9 1 6v8c0 1.1 0.9 2 2 2h14c1.1 0 2 -0.9 2 -2zm-2 0H3V6H17ZM23 8.9846154V18c0 1.1 -0.9 2 -2 2H5.9846154A1.9846154 1.9846154 45 0 1 4 18.015385V18H21V7h0.01538A1.9846154 1.9846154 45 0 1 23 8.9846154Z"
24+
android:fillColor="#FFFFFF" />
25+
</vector>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="120"
5+
android:viewportHeight="124"
6+
android:tint="@android:color/holo_blue_dark">
7+
<group android:scaleX="0.89032257"
8+
android:scaleY="0.92"
9+
android:translateX="6.580645"
10+
android:translateY="4.96">
11+
<path
12+
android:name="path_1"
13+
android:pathData="M 48 0 C 47 0 45.9 0.1 44.9 0.4 C 40.7 1.8 38.6 5.8 37.6 9.5 C 36.6 13.2 36.4 17.3 36.3 21.4 C 36.2 25.5 36.1 29.7 35.8 33.1 C 35.5 36.5 34.6 39 34.1 39.7 C 33.6 40.4 31.4 42 28.3 43.3 C 25.2 44.7 21.3 46 17.4 47.4 C 13.5 48.8 9.7 50.3 6.4 52.3 C 3.2 54.3 0 57.5 0 62 C 0 66.5 3.1 69.6 6.4 71.7 C 9.7 73.8 13.4 75.2 17.3 76.7 C 21.2 78.1 25.1 79.4 28.2 80.8 C 31.3 82.2 33.5 83.7 34 84.4 C 34.5 85.1 35.3 87.7 35.6 91.1 C 35.9 94.5 36 98.6 36.1 102.8 C 36.2 106.9 36.5 111 37.4 114.7 C 38.3 118.4 40.4 122.4 44.6 123.8 C 48.8 125.2 52.8 123.2 55.8 120.7 C 58.8 118.2 61.4 115.1 63.9 111.9 C 66.4 108.7 68.9 105.3 71.2 102.8 C 73.5 100.3 75.6 98.6 76.5 98.4 C 77.3 98.1 80 98.2 83.3 98.9 C 86.6 99.6 90.6 100.9 94.5 102 C 98.5 103.1 102.4 104.2 106.2 104.4 C 110 104.6 114.4 103.9 117.1 100.3 C 119.7 96.7 119.1 92.3 117.7 88.7 C 116.3 85.1 114.1 81.7 111.8 78.3 C 109.5 74.9 107.1 71.5 105.4 68.6 C 103.7 65.7 102.8 63.1 102.8 62.2 C 102.8 61.2 103.9 58.2 106.1 54.8 C 108.2 51.4 111.1 47.5 113.6 43.7 C 115.6 40.7 117.3 37.6 118.4 34.5 C 119.4 31.3 119.7 27.4 117.4 24.2 C 114.8 20.6 110.4 19.9 106.5 20.1 C 102.7 20.3 98.7 21.4 94.7 22.5 C 90.7 23.6 86.8 24.9 83.5 25.6 C 80.2 26.3 77.5 26.3 76.7 26.1 C 75.9 25.9 73.7 24.2 71.4 21.7 C 69.1 19.1 66.7 15.8 64.2 12.5 C 61.7 9.2 59.1 6.1 56.1 3.6 C 53.8 1.7 51 0.1 48 0 Z"
14+
android:fillColor="#FFFFFF"
15+
android:strokeWidth="1"/>
16+
</group>
17+
</vector>

0 commit comments

Comments
 (0)