Skip to content

Commit 6dd621f

Browse files
feat: navigation icons update
1 parent a0fbad8 commit 6dd621f

16 files changed

+100
-120
lines changed

app/src/main/java/org/openedx/app/MainFragment.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,16 @@ class MainFragment : Fragment(R.layout.fragment_main) {
104104
R.id.fragmentDownloads to resources.getString(R.string.app_navigation_downloads),
105105
R.id.fragmentProfile to resources.getString(R.string.app_navigation_profile),
106106
)
107-
val tabIcons = mapOf(
108-
R.id.fragmentLearn to R.drawable.app_ic_rows,
109-
R.id.fragmentDiscover to R.drawable.app_ic_home,
110-
R.id.fragmentDownloads to R.drawable.app_ic_download_cloud,
111-
R.id.fragmentProfile to R.drawable.app_ic_profile
107+
val tabIconSelectors = mapOf(
108+
R.id.fragmentLearn to R.drawable.app_ic_learn_selector,
109+
R.id.fragmentDiscover to R.drawable.app_ic_discover_selector,
110+
R.id.fragmentDownloads to R.drawable.app_ic_downloads_selector,
111+
R.id.fragmentProfile to R.drawable.app_ic_profile_selector
112112
)
113113

114114
for ((id, _) in tabList) {
115115
val menuItem = menu.add(Menu.NONE, id, Menu.NONE, tabTitles[id] ?: "")
116-
tabIcons[id]?.let { menuItem.setIcon(it) }
116+
tabIconSelectors[id]?.let { menuItem.setIcon(it) }
117117
}
118118
}
119119

app/src/main/res/drawable/app_ic_book.xml

Lines changed: 0 additions & 45 deletions
This file was deleted.
File renamed without changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="20dp"
3+
android:height="17dp"
4+
android:viewportWidth="20"
5+
android:viewportHeight="17">
6+
<path
7+
android:pathData="M5.5,15.669C4.074,15.669 2.673,16.045 1.438,16.758C1.019,16.999 0.484,16.856 0.242,16.438C0.001,16.019 0.144,15.484 0.563,15.242C2.064,14.375 3.767,13.919 5.5,13.919C7.067,13.919 8.609,14.292 10,15.004C11.391,14.292 12.933,13.919 14.5,13.919C16.233,13.919 17.936,14.375 19.438,15.242C19.856,15.484 19.999,16.019 19.758,16.438C19.516,16.856 18.981,16.999 18.563,16.758C17.327,16.045 15.926,15.669 14.5,15.669C13.074,15.669 11.673,16.045 10.438,16.758C10.167,16.914 9.833,16.914 9.563,16.758C8.327,16.045 6.926,15.669 5.5,15.669Z"
8+
android:fillColor="#97A5BB"
9+
android:fillType="evenOdd" />
10+
<path
11+
android:pathData="M5.5,2.669C4.074,2.669 2.673,3.045 1.438,3.758C1.019,3.999 0.484,3.856 0.242,3.438C0.001,3.019 0.144,2.484 0.563,2.242C2.064,1.376 3.767,0.919 5.5,0.919C7.067,0.919 8.609,1.292 10,2.004C11.391,1.292 12.933,0.919 14.5,0.919C16.233,0.919 17.936,1.376 19.438,2.242C19.856,2.484 19.999,3.019 19.758,3.438C19.516,3.856 18.981,3.999 18.563,3.758C17.327,3.045 15.926,2.669 14.5,2.669C13.074,2.669 11.673,3.045 10.438,3.758C10.167,3.914 9.833,3.914 9.563,3.758C8.327,3.045 6.926,2.669 5.5,2.669Z"
12+
android:fillColor="#97A5BB"
13+
android:fillType="evenOdd" />
14+
<path
15+
android:pathData="M1,2.125C1.483,2.125 1.875,2.517 1.875,3V16C1.875,16.483 1.483,16.875 1,16.875C0.517,16.875 0.125,16.483 0.125,16V3C0.125,2.517 0.517,2.125 1,2.125Z"
16+
android:fillColor="#97A5BB"
17+
android:fillType="evenOdd" />
18+
<path
19+
android:pathData="M10,2.125C10.483,2.125 10.875,2.517 10.875,3V16C10.875,16.483 10.483,16.875 10,16.875C9.517,16.875 9.125,16.483 9.125,16V3C9.125,2.517 9.517,2.125 10,2.125Z"
20+
android:fillColor="#97A5BB"
21+
android:fillType="evenOdd" />
22+
<path
23+
android:pathData="M19,2.125C19.483,2.125 19.875,2.517 19.875,3V16C19.875,16.483 19.483,16.875 19,16.875C18.517,16.875 18.125,16.483 18.125,16V3C18.125,2.517 18.517,2.125 19,2.125Z"
24+
android:fillColor="#97A5BB"
25+
android:fillType="evenOdd" />
26+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="@drawable/app_ic_search_fill" android:state_checked="true" />
4+
<item android:drawable="@drawable/app_ic_search_outline" />
5+
</selector>

app/src/main/res/drawable/app_ic_download_cloud.xml renamed to app/src/main/res/drawable/app_ic_download_cloud_fill.xml

File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="16dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="16">
6+
<path
7+
android:pathData="M19.35,6.04C18.67,2.59 15.64,0 12,0C9.11,0 6.6,1.64 5.35,4.04C2.34,4.36 0,6.91 0,10C0,13.31 2.69,16 6,16H19C21.76,16 24,13.76 24,11C24,8.36 21.95,6.22 19.35,6.04ZM19,14H6C3.79,14 2,12.21 2,10C2,7.95 3.53,6.24 5.56,6.03L6.63,5.92L7.13,4.97C8.08,3.14 9.94,2 12,2C14.62,2 16.88,3.86 17.39,6.43L17.69,7.93L19.22,8.04C20.78,8.14 22,9.45 22,11C22,12.65 20.65,14 19,14ZM13.45,6H10.55V9H8L12,13L16,9H13.45V6Z"
8+
android:fillColor="#97A5BB" />
9+
</vector>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="@drawable/app_ic_download_cloud_fill" android:state_checked="true" />
4+
<item android:drawable="@drawable/app_ic_download_cloud_outline" />
5+
</selector>

app/src/main/res/drawable/app_ic_home.xml

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
3+
<item android:drawable="@drawable/app_ic_book_fill" android:state_checked="true" />
4+
<item android:drawable="@drawable/app_ic_book_outline" />
5+
</selector>

0 commit comments

Comments
 (0)