Skip to content

Commit 6f557d4

Browse files
style(bottomNavigation): Add icon-states
Signed-off-by: Andy Scherzinger <[email protected]>
1 parent a0bd51c commit 6f557d4

File tree

5 files changed

+48
-4
lines changed

5 files changed

+48
-4
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Nextcloud - Android Client
4+
~
5+
~ SPDX-FileCopyrightText: 2025 Andy Scherzinger <[email protected]>
6+
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
7+
-->
8+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
9+
<item android:drawable="@drawable/nav_assistant" android:state_checked="false" />
10+
<item android:drawable="@drawable/ic_assistant" android:state_checked="true" />
11+
</selector>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Nextcloud - Android Client
4+
~
5+
~ SPDX-FileCopyrightText: 2025 Andy Scherzinger <[email protected]>
6+
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
7+
-->
8+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
9+
<item android:drawable="@drawable/nav_favorites" android:state_checked="false" />
10+
<item android:drawable="@drawable/ic_star" android:state_checked="true" />
11+
</selector>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Nextcloud - Android Client
4+
~
5+
~ SPDX-FileCopyrightText: 2025 Andy Scherzinger <[email protected]>
6+
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
7+
-->
8+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
9+
<item android:drawable="@drawable/all_files" android:state_checked="false" />
10+
<item android:drawable="@drawable/ic_folder_offline" android:state_checked="true" />
11+
</selector>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
~ Nextcloud - Android Client
4+
~
5+
~ SPDX-FileCopyrightText: 2025 Andy Scherzinger <[email protected]>
6+
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
7+
-->
8+
<selector xmlns:android="http://schemas.android.com/apk/res/android">
9+
<item android:drawable="@drawable/nav_photos" android:state_checked="false" />
10+
<item android:drawable="@drawable/ic_image_grey600" android:state_checked="true" />
11+
</selector>

app/src/main/res/menu/bottom_navigation_menu.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@
99
<item
1010
android:id="@+id/nav_all_files"
1111
android:enabled="true"
12-
android:icon="@drawable/folder"
12+
android:icon="@drawable/selector_files"
1313
android:title="@string/bottom_navigation_menu_files_label"/>
1414

1515
<item
1616
android:id="@+id/nav_favorites"
1717
android:enabled="true"
18-
android:icon="@drawable/nav_favorites"
18+
android:icon="@drawable/selector_favorites"
1919
android:title="@string/bottom_navigation_menu_favorites_label"/>
2020

2121
<item
2222
android:id="@+id/nav_assistant"
2323
android:enabled="true"
24-
android:icon="@drawable/ic_assistant"
24+
android:icon="@drawable/selector_assistant"
2525
android:title="@string/bottom_navigation_menu_assistant_label"/>
2626

2727
<item
2828
android:id="@+id/nav_gallery"
2929
android:enabled="true"
30-
android:icon="@drawable/nav_photos"
30+
android:icon="@drawable/selector_media"
3131
android:title="@string/bottom_navigation_menu_media_label"/>
3232

3333
</menu>

0 commit comments

Comments
 (0)